route

package
v0.1.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 24, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EndpointEntry

type EndpointEntry 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 IngressRoute

type IngressRoute struct {
	RouteBase `json:",inline"`
	// Hash
	Hash string `json:"hash" hash:"ignore"`
	// Routes
	Routes []IngressRouteEntry `json:"routes" hash:"set"`
}

type IngressRouteEntry

type IngressRouteEntry struct {
	Host        string            `json:"host,omitempty"`
	Path        string            `json:"path,omitempty"`
	ServiceName string            `json:"serviceName,omitempty"`
	Rewrite     []string          `json:"rewrite,omitempty"`
	Sticky      bool              `json:"sticky,omitempty"`
	Balancer    repo.AlgoBalancer `json:"balancer,omitempty"`
	Upstreams   []EndpointEntry   `json:"upstreams,omitempty" hash:"set"`
}

type RouteBase

type RouteBase struct {
	UID string `json:"uid"`
	// Region,
	Region string `json:"region"`
	// Zone,
	Zone string `json:"zone"`
	// Group,
	Group string `json:"group"`
	// Cluster,
	Cluster string `json:"cluster"`
	// Gateway
	Gateway string `json:"gateway"`
}

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"`
	// ExternalPath, it's for out-cluster access, combined with address, can be empty if it's not exposed by ingress
	ExternalPath string `json:"externalPath,omitempty"`
	// Export
	Export bool `json:"export,omitempty"`
	// ExportName
	ExportName string `json:"exportName,omitempty"`
}

type Target

type Target struct {
	// Address can be IP address if in the same cluster, or ingress address for out cluster route
	Address string `json:"address"`
	// Tag, reserved placeholder for futher features
	Tags map[string]string `json:"tags,omitempty" hash:"set"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL