Versions in this module Expand all Collapse all v1 v1.5.1 Oct 14, 2025 v1.5.0 Sep 4, 2025 v1.4.2 Apr 28, 2025 v1.4.1 Jan 9, 2025 v0 v0.3.0 Feb 7, 2019 v0.2.0 Nov 13, 2018 v0.1.0 May 30, 2018 Changes in this version + const APIVersion + type Connections struct + Accepted uint64 + Active uint64 + Dropped uint64 + Idle uint64 + type HTTPRequests struct + Current uint64 + Total uint64 + type HealthChecks struct + Checks uint64 + Fails uint64 + LastPassed bool + Unhealthy uint64 + type NginxClient struct + func NewNginxClient(httpClient *http.Client, apiEndpoint string) (*NginxClient, error) + func (client *NginxClient) GetStubStats() (*StubStats, error) + type NginxPlusClient struct + func NewNginxPlusClient(httpClient *http.Client, apiEndpoint string) (*NginxPlusClient, error) + func (client *NginxPlusClient) AddHTTPServer(upstream string, server UpstreamServer) error + func (client *NginxPlusClient) AddStreamServer(upstream string, server StreamUpstreamServer) error + func (client *NginxPlusClient) CheckIfStreamUpstreamExists(upstream string) error + func (client *NginxPlusClient) CheckIfUpstreamExists(upstream string) error + func (client *NginxPlusClient) DeleteHTTPServer(upstream string, server string) error + func (client *NginxPlusClient) DeleteStreamServer(upstream string, server string) error + func (client *NginxPlusClient) GetHTTPServers(upstream string) ([]UpstreamServer, error) + func (client *NginxPlusClient) GetStats() (*Stats, error) + func (client *NginxPlusClient) GetStreamServers(upstream string) ([]StreamUpstreamServer, error) + func (client *NginxPlusClient) UpdateHTTPServers(upstream string, servers []UpstreamServer) ([]UpstreamServer, []UpstreamServer, error) + func (client *NginxPlusClient) UpdateStreamServers(upstream string, servers []StreamUpstreamServer) ([]StreamUpstreamServer, []StreamUpstreamServer, error) + type Peer struct + Active uint64 + Backup bool + Downstart string + Downtime uint64 + Fails uint64 + HeaderTime uint64 + HealthChecks HealthChecks + ID int + MaxConns int + Name string + Received uint64 + Requests uint64 + ResponseTime uint64 + Responses Responses + Selected string + Sent uint64 + Server string + Service string + State string + Unavail uint64 + Weight int + type Queue struct + MaxSize int + Overflows uint64 + Size int + type Responses struct + Responses1xx uint64 + Responses2xx uint64 + Responses3xx uint64 + Responses4xx uint64 + Responses5xx uint64 + type SSL struct + Handshakes uint64 + HandshakesFailed uint64 + SessionReuses uint64 + type ServerZone struct + Discarded uint64 + Processing uint64 + Received uint64 + Requests uint64 + Responses Responses + Sent uint64 + type ServerZones map[string]ServerZone + type Stats struct + Connections Connections + HTTPRequests HTTPRequests + SSL SSL + ServerZones ServerZones + Upstreams Upstreams + type StreamUpstreamServer struct + FailTimeout string + ID int64 + MaxFails int64 + Server string + SlowStart string + type StubConnections struct + Accepted int64 + Active int64 + Handled int64 + Reading int64 + Waiting int64 + Writing int64 + type StubStats struct + Connections StubConnections + Requests int64 + type Upstream struct + Keepalives int + Peers []Peer + Queue Queue + Zombies int + Zone string + type UpstreamServer struct + FailTimeout string + ID int + MaxFails int + Server string + SlowStart string + type Upstreams map[string]Upstream