Skip to content

Commit 5ca35c1

Browse files
committed
add NginxLicense to Stats struct
1 parent e137c2e commit 5ca35c1

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

client/nginx.go

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ type Stats struct {
175175
StreamZoneSync *StreamZoneSync
176176
Workers []*Workers
177177
NginxInfo NginxInfo
178+
NginxLicense NginxLicense
178179
SSL SSL
179180
Connections Connections
180181
HTTPRequests HTTPRequests
@@ -1267,6 +1268,19 @@ func (client *NginxClient) GetStats(ctx context.Context) (*Stats, error) {
12671268
return nil
12681269
})
12691270

1271+
initialGroup.Go(func() error {
1272+
nginxLicense, err := client.GetNginxLicense(initialCtx)
1273+
if err != nil {
1274+
return fmt.Errorf("failed to get NGINX license: %w", err)
1275+
}
1276+
1277+
mu.Lock()
1278+
stats.NginxLicense = *nginxLicense
1279+
mu.Unlock()
1280+
1281+
return nil
1282+
})
1283+
12701284
initialGroup.Go(func() error {
12711285
caches, err := client.GetCaches(initialCtx)
12721286
if err != nil {

0 commit comments

Comments
 (0)