Documentation ¶
Index ¶
- func Connect(c *NitroClient) error
- func Disconnect(c *NitroClient) error
- type CSVirtualServerStats
- type DisconnectPayload
- type GSLBServiceStats
- type GSLBVirtualServerStats
- type InterfaceStats
- type LBVirtualServerBindings
- type LoginCreds
- type LoginPayload
- type NSAPIResponse
- func GetCSVirtualServerStats(c *NitroClient, querystring string) (NSAPIResponse, error)
- func GetGSLBServiceStats(c *NitroClient, querystring string) (NSAPIResponse, error)
- func GetGSLBVirtualServerStats(c *NitroClient, querystring string) (NSAPIResponse, error)
- func GetInterfaceStats(c *NitroClient, querystring string) (NSAPIResponse, error)
- func GetLBVSBindings(c *NitroClient, querystring string) (NSAPIResponse, error)
- func GetNSLicense(c *NitroClient, querystring string) (NSAPIResponse, error)
- func GetNSStats(c *NitroClient, querystring string) (NSAPIResponse, error)
- func GetServiceGroupMemberStats(c *NitroClient, querystring string) (NSAPIResponse, error)
- func GetServiceGroups(c *NitroClient, querystring string) (NSAPIResponse, error)
- func GetServiceStats(c *NitroClient, querystring string) (NSAPIResponse, error)
- func GetVPNVirtualServerStats(c *NitroClient, querystring string) (NSAPIResponse, error)
- func GetVirtualServerStats(c *NitroClient, querystring string) (NSAPIResponse, error)
- type NSLicense
- type NSStats
- type NitroClient
- type ServiceGroupMemberStats
- type ServiceGroups
- type ServiceStats
- type VPNVirtualServerStats
- type VirtualServerStats
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Connect ¶
func Connect(c *NitroClient) error
Connect initiates a connection to a NetScaler and returns the session token
Types ¶
type CSVirtualServerStats ¶
type CSVirtualServerStats struct { Name string `json:"name"` State string `json:"state"` TotalHits string `json:"tothits"` TotalRequests string `json:"totalrequests"` TotalResponses string `json:"totalresponses"` TotalRequestBytes string `json:"totalrequestbytes"` TotalResponseBytes string `json:"totalresponsebytes"` CurrentClientConnections string `json:"curclntconnections"` CurrentServerConnections string `json:"cursrvrconnections"` EstablishedConnections string `json:"establishedconn"` TotalPacketsReceived string `json:"totalpktsrecvd"` TotalPacketsSent string `json:"totalpktssent"` TotalSpillovers string `json:"totspillovers"` DeferredRequests string `json:"deferredreq"` InvalidRequestResponse string `json:"invalidrequestresponse"` InvalidRequestResponseDropped string `json:"invalidrequestresponsedropped"` TotalVServerDownBackupHits string `json:"totvserverdownbackuphits"` CurrentMultipathSessions string `json:"curmptcpsessions"` CurrentMultipathSubflows string `json:"cursubflowconn"` }
CSVirtualServerStats represents the data returned from the /stat/csvserver Nitro API endpoint
type DisconnectPayload ¶
type DisconnectPayload struct {
Logout struct {
} `json:"logout"`
}
DisconnectPayload is the JSON that needs to be sent to NetScaler to logout
type GSLBServiceStats ¶
type GSLBServiceStats struct { Name string `json:"servicename"` State string `json:"state"` TotalRequests string `json:"totalrequests"` TotalResponses string `json:"totalresponses"` TotalRequestBytes string `json:"totalrequestbytes"` TotalResponseBytes string `json:"totalresponsebytes"` CurrentClientConnections string `json:"curclntconnections"` CurrentServerConnections string `json:"cursrvrconnections"` EstablishedConnections string `json:"establishedconn"` CurrentLoad string `json:"curload"` ServiceHits string `json:"vsvrservicehits"` }
GSLBServiceStats represents the data returned from the /stat/gslbservice Nitro API endpoint
type GSLBVirtualServerStats ¶
type GSLBVirtualServerStats struct { Name string `json:"name"` Health string `json:"vslbhealth"` InactiveServices string `json:"inactsvcs"` ActiveServices string `json:"actsvcs"` TotalHits string `json:"tothits"` TotalRequests string `json:"totalrequests"` TotalResponses string `json:"totalresponses"` TotalRequestBytes string `json:"totalrequestbytes"` TotalResponseBytes string `json:"totalresponsebytes"` CurrentClientConnections string `json:"curclntconnections"` CurrentServerConnections string `json:"cursrvrconnections"` }
GSLBVirtualServerStats represents the data returned from the /stat/gslbvserver Nitro API endpoint
type InterfaceStats ¶
type InterfaceStats struct { ID string `json:"id"` TotalReceivedBytes string `json:"totrxbytes"` TotalTransmitBytes string `json:"tottxbytes"` TotalReceivedPackets string `json:"totrxpkts"` TotalTransmitPackets string `json:"tottxpkts"` JumboPacketsReceived string `json:"jumbopktsreceived"` JumboPacketsTransmitted string `json:"jumbopktstransmitted"` ErrorPacketsReceived string `json:"errpktrx"` Alias string `json:"interfacealias"` }
InterfaceStats represents the data returned from the /stat/interface Nitro API endpoint
type LBVirtualServerBindings ¶
type LBVirtualServerBindings struct { Name string `json:"name"` ServiceName string `json:"servicename"` }
LBVirtualServerBindings represents the data returned from the /config/nslicense Nitro API endpoint
type LoginCreds ¶
LoginCreds contains the username and password
type LoginPayload ¶
type LoginPayload struct {
Login LoginCreds `json:"login"`
}
LoginPayload is the request body that needs to be sent to NetScaler to login
type NSAPIResponse ¶
type NSAPIResponse struct { Errorcode int64 `json:"errorcode"` Message string `json:"message"` Severity string `json:"severity"` NSLicense NSLicense `json:"nslicense"` NSStats NSStats `json:"ns"` InterfaceStats []InterfaceStats `json:"Interface"` VirtualServerStats []VirtualServerStats `json:"lbvserver"` ServiceStats []ServiceStats `json:"service"` ServiceGroups []ServiceGroups `json:"servicegroup"` ServiceGroupMemberStats []ServiceGroupMemberStats `json:"servicegroupmember"` GSLBServiceStats []GSLBServiceStats `json:"gslbservice"` GSLBVirtualServerStats []GSLBVirtualServerStats `json:"gslbvserver"` CSVirtualServerStats []CSVirtualServerStats `json:"csvserver"` VPNVirtualServerStats []VPNVirtualServerStats `json:"vpnvserver"` LBVServerServiceBindings []LBVirtualServerBindings `json:"lbvserver_service_binding"` }
NSAPIResponse represents the main portion of the Nitro API response
func GetCSVirtualServerStats ¶
func GetCSVirtualServerStats(c *NitroClient, querystring string) (NSAPIResponse, error)
GetCSVirtualServerStats queries the Nitro API for Content Switching virtual server stats
func GetGSLBServiceStats ¶
func GetGSLBServiceStats(c *NitroClient, querystring string) (NSAPIResponse, error)
GetGSLBServiceStats queries the Nitro API for service stats
func GetGSLBVirtualServerStats ¶
func GetGSLBVirtualServerStats(c *NitroClient, querystring string) (NSAPIResponse, error)
GetGSLBVirtualServerStats queries the Nitro API for virtual server stats
func GetInterfaceStats ¶
func GetInterfaceStats(c *NitroClient, querystring string) (NSAPIResponse, error)
GetInterfaceStats queries the Nitro API for interface stats
func GetLBVSBindings ¶
func GetLBVSBindings(c *NitroClient, querystring string) (NSAPIResponse, error)
GetLBVSBindings queries the Nitro API for license config
func GetNSLicense ¶
func GetNSLicense(c *NitroClient, querystring string) (NSAPIResponse, error)
GetNSLicense queries the Nitro API for license config
func GetNSStats ¶
func GetNSStats(c *NitroClient, querystring string) (NSAPIResponse, error)
GetNSStats queries the Nitro API for ns stats
func GetServiceGroupMemberStats ¶
func GetServiceGroupMemberStats(c *NitroClient, querystring string) (NSAPIResponse, error)
GetServiceGroupMemberStats queries the Nitro API for servicegroup member stats
func GetServiceGroups ¶
func GetServiceGroups(c *NitroClient, querystring string) (NSAPIResponse, error)
GetServiceGroups queries the Nitro API for service group config
func GetServiceStats ¶
func GetServiceStats(c *NitroClient, querystring string) (NSAPIResponse, error)
GetServiceStats queries the Nitro API for service stats
func GetVPNVirtualServerStats ¶
func GetVPNVirtualServerStats(c *NitroClient, querystring string) (NSAPIResponse, error)
GetVPNVirtualServerStats queries the Nitro API for VPN virtual server stats
func GetVirtualServerStats ¶
func GetVirtualServerStats(c *NitroClient, querystring string) (NSAPIResponse, error)
GetVirtualServerStats queries the Nitro API for virtual server stats
type NSLicense ¶
type NSLicense struct {
ModelID string `json:"modelid"`
}
NSLicense represents the data returned from the /config/nslicense Nitro API endpoint
type NSStats ¶
type NSStats struct { CPUUsagePcnt float64 `json:"cpuusagepcnt"` MemUsagePcnt float64 `json:"memusagepcnt"` MgmtCPUUsagePcnt float64 `json:"mgmtcpuusagepcnt"` PktCPUUsagePcnt float64 `json:"pktcpuusagepcnt"` FlashPartitionUsage float64 `json:"disk0perusage"` VarPartitionUsage float64 `json:"disk1perusage"` TotalReceivedMB string `json:"totrxmbits"` TotalTransmitMB string `json:"tottxmbits"` HTTPRequests string `json:"httptotrequests"` HTTPResponses string `json:"httptotresponses"` TCPCurrentClientConnections string `json:"tcpcurclientconn"` TCPCurrentClientConnectionsEstablished string `json:"tcpcurclientconnestablished"` TCPCurrentServerConnections string `json:"tcpcurserverconn"` TCPCurrentServerConnectionsEstablished string `json:"tcpcurserverconnestablished"` }
NSStats represents the data returned from the /stat/ns Nitro API endpoint
type NitroClient ¶
type NitroClient struct {
// contains filtered or unexported fields
}
NitroClient represents the client used to connect to the API
func NewNitroClient ¶
func NewNitroClient(url string, username string, password string, ignoreCert bool) (*NitroClient, error)
NewNitroClient creates a new client used to interact with the Nitro API. URL, username and password are passed to this function to allow connections to any NetScaler endpoint. The ignoreCert parameter allows self-signed certificates to be accepted. It should be used sparingly and only when you fully trust the endpoint.
type ServiceGroupMemberStats ¶
type ServiceGroupMemberStats struct { State string `json:"state"` AvgTimeToFirstByte string `json:"avgsvrttfb"` TotalRequests string `json:"totalrequests"` TotalResponses string `json:"totalresponses"` TotalRequestBytes string `json:"totalrequestbytes"` TotalResponseBytes string `json:"totalresponsebytes"` CurrentClientConnections string `json:"curclntconnections"` SurgeCount string `json:"surgecount"` CurrentServerConnections string `json:"cursrvrconnections"` ServerEstablishedConnections string `json:"svrestablishedconn"` CurrentReusePool string `json:"curreusepool"` MaxClients string `json:"maxclients"` PrimaryIPAddress string `json:"primaryipaddress"` ServiceGroupName string `json:"servicegroupname"` }
ServiceGroupMemberStats represents the data returned from the /stat/servicegroupmember Nitro API endpoint
type ServiceGroups ¶
type ServiceGroups struct { Name string `json:"servicegroupname"` ServiceGroupMembers []ServiceGroupMemberStats `json:"servicegroupmember"` }
ServiceGroups represents the data returned from the /config/servicegroup Nitro API endpoint
type ServiceStats ¶
type ServiceStats struct { Name string `json:"name"` Throughput string `json:"throughput"` AvgTimeToFirstByte string `json:"avgsvrttfb"` State string `json:"state"` TotalRequests string `json:"totalrequests"` TotalResponses string `json:"totalresponses"` TotalRequestBytes string `json:"totalrequestbytes"` TotalResponseBytes string `json:"totalresponsebytes"` CurrentClientConnections string `json:"curclntconnections"` SurgeCount string `json:"surgecount"` CurrentServerConnections string `json:"cursrvrconnections"` ServerEstablishedConnections string `json:"svrestablishedconn"` CurrentReusePool string `json:"curreusepool"` MaxClients string `json:"maxclients"` CurrentLoad string `json:"curload"` ServiceHits string `json:"vsvrservicehits"` ActiveTransactions string `json:"activetransactions"` }
ServiceStats represents the data returned from the /stat/service Nitro API endpoint
type VPNVirtualServerStats ¶
type VPNVirtualServerStats struct { Name string `json:"name"` TotalRequests string `json:"totalrequests"` TotalResponses string `json:"totalresponses"` TotalRequestBytes string `json:"totalrequestbytes"` TotalResponseBytes string `json:"totalresponsebytes"` State string `json:"state"` }
VPNVirtualServerStats represents the data returned from the /stat/vpnvserver Nitro API endpoint
type VirtualServerStats ¶
type VirtualServerStats struct { Name string `json:"name"` WaitingRequests string `json:"vsvrsurgecount"` Health string `json:"vslbhealth"` InactiveServices string `json:"inactsvcs"` ActiveServices string `json:"actsvcs"` TotalHits string `json:"tothits"` TotalRequests string `json:"totalrequests"` TotalResponses string `json:"totalresponses"` TotalRequestBytes string `json:"totalrequestbytes"` TotalResponseBytes string `json:"totalresponsebytes"` CurrentClientConnections string `json:"curclntconnections"` CurrentServerConnections string `json:"cursrvrconnections"` Type string `json:"type"` State string `json:"state"` }
VirtualServerStats represents the data returned from the /stat/lbvserver Nitro API endpoint
Source Files ¶
- connect.go
- disconnect.go
- get_config.go
- get_cs_virtual_server_stats.go
- get_gslb_service_stats.go
- get_gslb_virtual_server_stats.go
- get_interface_stats.go
- get_lb_virtual_server_bindings.go
- get_ns_license.go
- get_ns_stats.go
- get_service_group_member_stats.go
- get_service_groups.go
- get_service_stats.go
- get_stats.go
- get_virtual_server_stats.go
- get_vpn_virtual_server_stats.go
- new_nitro_client.go
- nsapiresponse.go