File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -193,6 +193,20 @@ type NginxInfo struct {
193193 ParentProcessID uint64 `json:"ppid"`
194194}
195195
196+ // LicenseReporting contains information about license status for NGINX Plus.
197+ type LicenseReporting struct {
198+ Healthy bool
199+ Fails uint64
200+ Grace uint64
201+ }
202+
203+ // NginxLicense contains licensing information about NGINX Plus.
204+ type NginxLicense struct {
205+ ActiveTill uint64 `json:"active_till"`
206+ Eval bool
207+ Reporting LicenseReporting
208+ }
209+
196210// Caches is a map of cache stats by cache zone.
197211type Caches = map [string ]HTTPCache
198212
@@ -1553,6 +1567,16 @@ func (client *NginxClient) GetNginxInfo(ctx context.Context) (*NginxInfo, error)
15531567 return & info , nil
15541568}
15551569
1570+ // GetNginxLicense returns Nginx License data with a context.
1571+ func (client * NginxClient ) GetNginxLicense (ctx context.Context ) (* NginxLicense , error ) {
1572+ var info NginxLicense
1573+ err := client .get (ctx , "license" , & info )
1574+ if err != nil {
1575+ return nil , fmt .Errorf ("failed to get info: %w" , err )
1576+ }
1577+ return & info , nil
1578+ }
1579+
15561580// GetCaches returns Cache stats with a context.
15571581func (client * NginxClient ) GetCaches (ctx context.Context ) (* Caches , error ) {
15581582 var caches Caches
You can’t perform that action at this time.
0 commit comments