controlplane

package
v1.1.30 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2023 License: MIT Imports: 45 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultRoute

func DefaultRoute() *route.Route

func Main

func Main(filename string, port uint, logger *log.Logger)

func OriginCluster

func OriginCluster() *cluster.Cluster

func RunServer

func RunServer(ctx context.Context, server serverv3.Server, port uint)

func ToCluster

func ToCluster(clusterName string) *cluster.Cluster

func ToEndPoint

func ToEndPoint(clusterName string, localTunIP string, port int32) *endpoint.ClusterLoadAssignment

func ToListener

func ToListener(listenerName string, routeName string, port int32, p corev1.Protocol) *listener.Listener

func ToRoute

func ToRoute(clusterName string, headers map[string]string) *route.Route

func Watch

func Watch(watcher *fsnotify.Watcher, filename string, notifyCh chan<- NotifyMessage) error

Types

type NotifyMessage

type NotifyMessage struct {
	Operation OperationType
	FilePath  string
}

type OperationType

type OperationType int
const (
	Create OperationType = iota
	Remove
	Modify
)

type Processor

type Processor struct {
	// contains filtered or unexported fields
}

func NewProcessor

func NewProcessor(cache cache.SnapshotCache, log *logrus.Logger) *Processor

func (*Processor) ProcessFile

func (p *Processor) ProcessFile(file NotifyMessage)

type Rule

type Rule struct {
	Headers      map[string]string
	LocalTunIPv4 string
	LocalTunIPv6 string
}

type Virtual

type Virtual struct {
	Uid   string // group.resource.name
	Ports []corev1.ContainerPort
	Rules []*Rule
}

func ParseYaml

func ParseYaml(file string) ([]*Virtual, error)

func (*Virtual) To

func (a *Virtual) To() (
	listeners []types.Resource,
	clusters []types.Resource,
	routes []types.Resource,
	endpoints []types.Resource,
)

Jump to

Keyboard shortcuts

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