Documentation
¶
Index ¶
- Constants
- type Client
- func (c *Client) AddHeaderContentRule(name, headerKey, headerValue string) error
- func (c *Client) AddProtoPortHeaderRequestRules() error
- func (c *Client) AddRealServerByData(ip, port, protocol string, rs RealServer) error
- func (c *Client) AddRealServerByID(id int, rs RealServer) error
- func (c *Client) AddVirtualService(vs VirtualServiceParams) (VirtualService, error)
- func (c *Client) DeleteHeaderContentRule(name string) error
- func (c *Client) DeleteRealServerByData(ip, port, protocol string, rs RealServer) error
- func (c *Client) DeleteRealServerByID(id int, rs RealServer) error
- func (c *Client) DeleteVirtualServiceByData(ip, port, protocol string) error
- func (c *Client) DeleteVirtualServiceByID(id int) error
- func (c *Client) FindVirtualServiceByName(name string) (VirtualService, error)
- func (c *Client) Get(param string) (string, error)
- func (c *Client) GetStatistics() (Statistics, error)
- func (c *Client) ListVirtualServices() ([]VirtualService, error)
- func (c *Client) Request(cmd string, parameters map[string]string, data interface{}) error
- func (c *Client) Set(param, value string) (string, error)
- func (c *Client) ShowVirtualServiceByData(ip, port, protocol string) (VirtualService, error)
- func (c *Client) ShowVirtualServiceByID(id int) (VirtualService, error)
- func (c *Client) UpdateHeaderContentRule(name, headerKey, headerValue string) error
- func (c *Client) UpdateVirtualService(id int, vs VirtualServiceParams) (VirtualService, error)
- type Config
- type ContentRule
- type ContentRuleResponse
- type ErrorResponse
- type Header
- type Parameter
- type ParameterList
- type ParameterResponse
- type RealServer
- type RealServerList
- type RealServerResponse
- type RealServerStats
- type RealServerStatsList
- type Statistics
- type StatisticsResponse
- type Totals
- type VirtualService
- type VirtualServiceList
- type VirtualServiceListResponse
- type VirtualServiceParams
- type VirtualServiceResponse
- type VirtualServiceStats
- type VirtualServiceStatsList
Constants ¶
const ( ContentRuleAddHeader = "1" ContentRuleUpdateHeader = "3" ContentRuleDeleteHeader = "2" DeleteHeaderProtoName = "DeleteHeaderProto" DeleteHeaderPortName = "DeleteHeaderPort" DeleteHeaderPortValue = "X-Forwarded-Port" DeleteHeaderProtoValue = "X-Forwarded-Proto" )
const ( VStypeHTTP = "http" VStypeGeneric = "gen" VStypeSTARTTLS = "tls" VStypeRemoteTerminal = "ts" VStypeLogInsight = "log" )
The type of the virutalservice.
Doc from webui: > Select the type of service that will be run over this Virtual Service. > The LoadMaster automatically tries to determine the type of the service > but the user can override this.
const ( VSAddViaLegacyXClientSide = "0" VSAddViaNone = "2" VSAddViaXClientSideWithVia = "3" VSAddViaXClientSideNoVia = "4" VSAddViaXForwardedForWithVia = "1" VSAddViaXForwardedForNoVia = "5" VSAddViaViaOnly = "6" )
These are the options for the AddVia field. In the kemp webui it relates to the realserver option under Advanced Properties > Add HTTP Headers
Doc from the webui > Select which headers are to be added to HTTP requests. > X-ClientSide and X-Forwarded-For are only added to Non-Transparent Connections.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) AddHeaderContentRule ¶
func (*Client) AddProtoPortHeaderRequestRules ¶
func (*Client) AddRealServerByData ¶
func (c *Client) AddRealServerByData(ip, port, protocol string, rs RealServer) error
func (*Client) AddRealServerByID ¶
func (c *Client) AddRealServerByID(id int, rs RealServer) error
func (*Client) AddVirtualService ¶
func (c *Client) AddVirtualService(vs VirtualServiceParams) (VirtualService, error)
func (*Client) DeleteHeaderContentRule ¶
func (*Client) DeleteRealServerByData ¶
func (c *Client) DeleteRealServerByData(ip, port, protocol string, rs RealServer) error
func (*Client) DeleteRealServerByID ¶
func (c *Client) DeleteRealServerByID(id int, rs RealServer) error
func (*Client) DeleteVirtualServiceByData ¶
func (*Client) FindVirtualServiceByName ¶
func (c *Client) FindVirtualServiceByName(name string) (VirtualService, error)
func (*Client) GetStatistics ¶
func (c *Client) GetStatistics() (Statistics, error)
GetStatistics calls the API, and returns a Statistics object.
func (*Client) ListVirtualServices ¶
func (c *Client) ListVirtualServices() ([]VirtualService, error)
func (*Client) Request ¶
func (*Client) ShowVirtualServiceByData ¶
func (c *Client) ShowVirtualServiceByData(ip, port, protocol string) (VirtualService, error)
func (*Client) ShowVirtualServiceByID ¶
func (c *Client) ShowVirtualServiceByID(id int) (VirtualService, error)
func (*Client) UpdateHeaderContentRule ¶
func (*Client) UpdateVirtualService ¶
func (c *Client) UpdateVirtualService(id int, vs VirtualServiceParams) (VirtualService, error)
type ContentRule ¶
type ContentRuleResponse ¶
type ContentRuleResponse struct {
Debug string `xml:",innerxml"`
XMLName xml.Name `xml:"Response"`
CR ContentRule `xml:"Success>Data"`
}
type ParameterResponse ¶
type ParameterResponse struct {
Debug string `xml:",innerxml"`
XMLName xml.Name `xml:"Response"`
Data ParameterList `xml:"Success>Data"`
}
type RealServer ¶
type RealServerList ¶
type RealServerList struct {
Rs []RealServer `xml:",any"`
}
type RealServerResponse ¶
type RealServerResponse struct {
Debug string `xml:",innerxml"`
XMLName xml.Name `xml:"Response"`
Data RealServer `xml:"Success>Data"`
}
type RealServerStats ¶
type RealServerStats struct {
VSIndex int
RSIndex int
Address string `xml:"Addr"`
Port int
TotalConnections int `xml:"Conns"`
TotalPackets int `xml:"Pkts"`
TotalBytes int `xml:"Bytes"`
TotalBits int `xml:"Bits"`
ActiveConnections int `xml:"ActivConns"`
ConnectionsPerSec int `xml:"ConnsPerSec"`
BytesRead int
BytesWritten int
Enabled int `xml:"Enable"`
Weight int
Persist int
}
RealServerStats represents statistics for a Real Server.
type RealServerStatsList ¶
type RealServerStatsList []RealServerStats
RealServerStatsList is a list of RealServerStats.
func (RealServerStatsList) Len ¶
func (l RealServerStatsList) Len() int
func (RealServerStatsList) Less ¶
func (l RealServerStatsList) Less(i int, j int) bool
func (RealServerStatsList) Swap ¶
func (l RealServerStatsList) Swap(i int, j int)
type Statistics ¶
type Statistics struct {
Totals Totals `xml:"VStotals"`
VirtualServices VirtualServiceStatsList `xml:"Vs"`
RealServers RealServerStatsList `xml:"Rs"`
}
Statistics represents the statistics data returned by the API.
type StatisticsResponse ¶
type StatisticsResponse struct {
Debug string `xml:",innerxml"`
XMLName xml.Name `xml:"Response"`
Data Statistics `xml:"Success>Data"`
}
StatisticsResponse represents the API response from the `stats` endpoint.
type Totals ¶
type Totals struct {
ConnectionsPerSec int `xml:"ConnsPerSec"`
BitsPerSec int
BytesPerSec int
PacketsPerSec int `xml:"PktsPerSec"`
}
Totals represents global statistics data.
type VirtualService ¶
type VirtualService struct {
ID int `xml:"Index"`
Name string `xml:"NickName"`
IPAddress string `xml:"VSAddress"`
Port string `xml:"VSPort"`
Protocol string
Status string
Enable string
SSLReverse string
SSLReencrypt string
Intercept string
InterceptOpts []string `xml:"InterceptOpts>Opt"`
AlertThreshold string
Transactionlimit string
Transparent string
ServerInit string
StartTLSMode string
Idletime string
Cache string
Compress string
Verify string
UseforSnat string
ForceL7 string
ClientCert string
ErrorCode string
CertFile string
CheckURL string `xml:"CheckUrl"`
CheckUse11 string `xml:"CheckUse1.1"`
MatchLen string
CheckUseGet string
SSLRewrite string
VStype string
FollowVSID int
Schedule string
CheckType string
PersistTimeout string
SSLAcceleration string
CheckPort string
NRules string
NRequestRules string
NResponseRules string
NPreProcessRules string
EspEnabled string
InputAuthMode string
OutputAuthMode string
MasterVS string
MasterVSID int
AddVia string
TlsType string
NeedHostName string
OCSPVerify string
NumberOfRSs string
Rs []RealServer `xml:"Rs"`
ExtraHdrKey string
ExtraHdrValue string
}
type VirtualServiceList ¶
type VirtualServiceList struct {
VS []VirtualService `xml:",any"`
}
type VirtualServiceListResponse ¶
type VirtualServiceListResponse struct {
Debug string `xml:",innerxml"`
XMLName xml.Name `xml:"Response"`
Data VirtualServiceList `xml:"Success>Data"`
}
type VirtualServiceParams ¶
type VirtualServiceParams struct {
Name string
IPAddress string
Port string
Protocol string
CheckType string
CheckURL string
CheckPort string
SSLAcceleration bool
Transparent bool
AddVia string
VStype string
ExtraRequestHeaderKey string
ExtraRequestHeaderValue string
Headers map[string]string
ContentRequestRules []string
}
type VirtualServiceResponse ¶
type VirtualServiceResponse struct {
Debug string `xml:",innerxml"`
XMLName xml.Name `xml:"Response"`
VS VirtualService `xml:"Success>Data"`
}
type VirtualServiceStats ¶
type VirtualServiceStats struct {
Index int
Address string `xml:"VSAddress"`
Port int `xml:"VSPort"`
Protocol string `xml:"VSProt"`
TotalConnections int `xml:"TotalConns"`
TotalPackets int `xml:"TotalPkts"`
TotalBytes int
TotalBits int
ActiveConnections int `xml:"ActiveConns"`
ConnectionsPerSec int `xml:"ConnsPerSec"`
BytesRead int
BytesWritten int
Enabled int `xml:"Enable"`
WafEnable int
ErrorCode int
}
VirtualServiceStats represents statistics for a Virtual Service.
type VirtualServiceStatsList ¶
type VirtualServiceStatsList []VirtualServiceStats
VirtualServiceStatsList is a list of VirtualServiceStats.
func (VirtualServiceStatsList) Len ¶
func (l VirtualServiceStatsList) Len() int
func (VirtualServiceStatsList) Less ¶
func (l VirtualServiceStatsList) Less(i int, j int) bool
func (VirtualServiceStatsList) Swap ¶
func (l VirtualServiceStatsList) Swap(i int, j int)
Source Files
¶
- contentrules.go
- kemp.go
- realservers.go
- stats.go
- virtualservices.go
- xml.go