Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlgoBalancer ¶ added in v0.2.0
type AlgoBalancer string
const ( RoundRobinLoadBalancer AlgoBalancer = "round-robin" HashingLoadBalancer AlgoBalancer = "hashing" LeastWorkLoadBalancer AlgoBalancer = "least-work" )
type BalancerConfig ¶ added in v0.2.0
type BalancerConfig struct {
Services map[string]BalancerSpec `json:"services"`
}
type BalancerSpec ¶ added in v0.2.0
type BalancerSpec struct {
Sticky bool `json:"sticky,omitempty"`
Balancer AlgoBalancer `json:"balancer,omitempty"`
Upstream *UpstreamSpec `json:"upstream,omitempty"`
}
type CertificateSpec ¶ added in v0.2.0
type IngressConfig ¶ added in v0.2.0
type IngressConfig struct {
TrustedCAs []string `json:"trustedCAs"`
TLSConfig `json:",inline"`
RouterConfig `json:",inline"`
BalancerConfig `json:",inline"`
}
type IngressData ¶ added in v0.2.0
type IngressData struct {
//RouteBase `json:",inline"`
// Hash
Hash string `json:"hash" hash:"ignore"`
// Routes
Routes []IngressRouteSpec `json:"routes" hash:"set"`
}
type IngressRouteSpec ¶ added in v0.2.0
type IngressRouteSpec struct {
RouterSpec `json:",inline"`
BalancerSpec `json:",inline"`
TLSSpec `json:",inline"`
}
type RouterConfig ¶ added in v0.2.0
type RouterConfig struct {
Routes map[string]RouterSpec `json:"routes"`
}
type RouterSpec ¶ added in v0.2.0
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 ¶ added in v0.2.0
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 ¶ added in v0.2.0
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 ¶ added in v0.2.0
type UpstreamSpec struct {
Protocol string `json:"proto,omitempty"`
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.