converting

package
v0.0.0-...-97db044 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2024 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ServiceToCluster

func ServiceToCluster(service *swarm.Service, labels *ServiceLabel) (c *cluster.Cluster, err error)

convertService will convert swarm service definitions into validated envoy resources

Types

type FilterChainBuilder

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

func NewFilterChainBuilder

func NewFilterChainBuilder(name string) *FilterChainBuilder

func (*FilterChainBuilder) Build

func (*FilterChainBuilder) EnableTLS

func (b *FilterChainBuilder) EnableTLS(serverNames []string, sdsConfig *auth.SdsSecretConfig) *FilterChainBuilder

func (*FilterChainBuilder) ForVhost

type ListenerBuilder

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

func NewListenerBuilder

func NewListenerBuilder(name string) *ListenerBuilder

func (*ListenerBuilder) AddFilterChain

func (b *ListenerBuilder) AddFilterChain(f *FilterChainBuilder) *ListenerBuilder

func (*ListenerBuilder) Build

func (b *ListenerBuilder) Build() *listener.Listener

func (*ListenerBuilder) EnableTLS

func (b *ListenerBuilder) EnableTLS() *ListenerBuilder

type ServiceEndpoint

type ServiceEndpoint struct {
	RequestTimeout time.Duration
	Protocol       types.SocketAddress_Protocol
	Port           types.SocketAddress_PortValue
}

type ServiceLabel

type ServiceLabel struct {
	Endpoint ServiceEndpoint
	Route    ServiceRoute
}

func NewServiceLabel

func NewServiceLabel() ServiceLabel

NewServiceLabel will create an ServiceLabel with default values Note that some values like the timeouts are based upon best practices for running at the edge: https://www.envoyproxy.io/docs/envoy/latest/configuration/best_practices/edge

func ParseServiceLabels

func ParseServiceLabels(labels map[string]string) *ServiceLabel

ParseServiceLabels constructs a ServiceLabel with default values and passed overrides

func (ServiceLabel) Validate

func (l ServiceLabel) Validate() error

type ServiceRoute

type ServiceRoute struct {
	Domain       string
	ExtraDomains []string // Note that you cannot assume that the domain or extraDomains are valid and reachable
	PathPrefix   string
}

type VhostCollection

type VhostCollection struct {
	Vhosts map[string]*route.VirtualHost
	// contains filtered or unexported fields
}

func NewVhostCollection

func NewVhostCollection() *VhostCollection

func (VhostCollection) AddService

func (w VhostCollection) AddService(clusterIdentifier string, labels *ServiceLabel) (err error)

Jump to

Keyboard shortcuts

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