Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlgoBalancer ¶
type AlgoBalancer string
const ( RoundRobinLoadBalancer AlgoBalancer = "round-robin" HashingLoadBalancer AlgoBalancer = "hashing" LeastWorkLoadBalancer AlgoBalancer = "least-work" )
type BalancerConfig ¶
type BalancerConfig struct {
Services map[string]BalancerSpec `json:"services"`
}
type BalancerSpec ¶
type BalancerSpec struct { Sticky bool `json:"sticky,omitempty"` Balancer AlgoBalancer `json:"balancer,omitempty"` Upstream *UpstreamSpec `json:"upstream,omitempty"` }
type CertificateSpec ¶
type IngressConfig ¶
type IngressConfig struct { TrustedCAs []string `json:"trustedCAs"` TLSConfig `json:",inline"` RouterConfig `json:",inline"` BalancerConfig `json:",inline"` }
type IngressData ¶
type IngressData struct { //RouteBase `json:",inline"` // Hash Hash string `json:"hash" hash:"ignore"` // Routes Routes []IngressRouteSpec `json:"routes" hash:"set"` }
type IngressRouteSpec ¶
type IngressRouteSpec struct { RouterSpec `json:",inline"` BalancerSpec `json:",inline"` TLSSpec `json:",inline"` }
type RouterConfig ¶
type RouterConfig struct {
Routes map[string]RouterSpec `json:"routes"`
}
type RouterSpec ¶
type ServiceRoute ¶
type ServiceRoute struct { //RouteBase `json:",inline"` // Hash Hash string `json:"hash" hash:"ignore"` Routes []ServiceRouteEntry `json:"routes" hash:"set"` }
type ServiceRouteEntry ¶
type ServiceRouteEntry struct { // Name, the name of the service Name string `json:"name"` // Namespace, the namespace of the service, it has value no matter in cluster/out cluster, but will only be used for in-cluster Namespace string `json:"namespace"` // Targets Targets []Target `json:"targets" hash:"set"` // PortName PortName string `json:"portName,omitempty"` }
type TLSSpec ¶
type TLSSpec struct { IsTLS bool `json:"isTLS,omitempty"` IsWildcardHost bool `json:"isWildcardHost,omitempty"` VerifyClient bool `json:"verifyClient,omitempty"` VerifyDepth int `json:"verifyDepth,omitempty"` Certificate *CertificateSpec `json:"certificate,omitempty"` TrustedCA *CertificateSpec `json:"trustedCA,omitempty"` }
type UpstreamEndpoint ¶
type UpstreamEndpoint struct { // IP is the entry's IP. The IP address protocol corresponds to the HashFamily of IPSet. // All entries' IP addresses in the same ip set has same the protocol, IPv4 or IPv6. IP string `json:"ip,omitempty"` // Port is the entry's Port. Port int `json:"port,omitempty"` // Protocol is the entry's Protocol. The protocols of entries in the same ip set are all // the same. The accepted protocols are TCP, UDP and SCTP. Protocol string `json:"protocol,omitempty"` }
type UpstreamSpec ¶
type UpstreamSpec struct { SSLName string `json:"sslName,omitempty"` SSLCert *CertificateSpec `json:"sslCert,omitempty"` SSLVerify bool `json:"sslVerify,omitempty"` Endpoints []UpstreamEndpoint `json:"endpoints,omitempty" hash:"set"` }
Click to show internal directories.
Click to hide internal directories.