Documentation
¶
Index ¶
- func DefaultRoute() *route.Route
- func DefaultRouteToCluster(clusterName string) *route.Route
- func Main(ctx context.Context, filename string, port uint, logger *log.Logger) error
- func OriginCluster() *cluster.Cluster
- func RunServer(ctx context.Context, server serverv3.Server, port uint) error
- func ToCluster(clusterName string) *cluster.Cluster
- func ToEndPoint(clusterName string, localTunIP string, port int32) *endpoint.ClusterLoadAssignment
- func ToListener(listenerName string, routeName string, port int32, p corev1.Protocol, ...) *listener.Listener
- func ToRoute(clusterName string, headers map[string]string) *route.Route
- func Watch(watcher *fsnotify.Watcher, filename string, notifyCh chan<- NotifyMessage) error
- type ContainerPort
- type NotifyMessage
- type OperationType
- type Processor
- type Rule
- type Virtual
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultRoute ¶
func DefaultRouteToCluster ¶ added in v2.3.10
func OriginCluster ¶
func ToEndPoint ¶
func ToEndPoint(clusterName string, localTunIP string, port int32) *endpoint.ClusterLoadAssignment
func ToListener ¶
Types ¶
type ContainerPort ¶ added in v2.3.10
type ContainerPort struct { // If specified, this must be an IANA_SVC_NAME and unique within the pod. Each // named port in a pod must have a unique name. Name for the port that can be // referred to by services. // +optional Name string `json:"name,omitempty"` // Number of port to expose on the host. // If specified, this must be a valid port number, 0 < x < 65536. // envoy listener port, if is not 0, means fargate mode // +optional EnvoyListenerPort int32 `json:"envoyListenerPort,omitempty"` // Number of port to expose on the pod's IP address. // This must be a valid port number, 0 < x < 65536. ContainerPort int32 `json:"containerPort"` // Protocol for port. Must be UDP, TCP, or SCTP. // Defaults to "TCP". // +optional // +default="TCP" Protocol corev1.Protocol `json:"protocol,omitempty"` }
func ConvertContainerPort ¶ added in v2.3.10
func ConvertContainerPort(ports ...corev1.ContainerPort) []ContainerPort
type NotifyMessage ¶
type NotifyMessage struct { Operation OperationType FilePath string }
type Processor ¶
type Processor struct {
// contains filtered or unexported fields
}
func NewProcessor ¶
func (*Processor) ProcessFile ¶
func (p *Processor) ProcessFile(file NotifyMessage) error
type Rule ¶
type Rule struct { Headers map[string]string LocalTunIPv4 string LocalTunIPv6 string // for no privileged mode (AWS Fargate mode), don't have cap NET_ADMIN and privileged: true. so we can not use OSI layer 3 proxy // containerPort -> envoyRulePort:localPort // envoyRulePort for envoy forward to localhost:envoyRulePort // localPort for local pc listen localhost:localPort // use ssh reverse tunnel, envoy rule endpoint localhost:envoyRulePort will forward to local pc localhost:localPort // localPort is required and envoyRulePort is optional PortMap map[int32]string }
type Virtual ¶
type Virtual struct { Uid string // group.resource.name Ports []ContainerPort Rules []*Rule }
Click to show internal directories.
Click to hide internal directories.