adsc

package
v0.2.11 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2021 License: MIT Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ClusterType  = resource.ClusterType
	EndpointType = resource.EndpointType
	ListenerType = resource.ListenerType
	RouteType    = resource.RouteType
	SecretType   = resource.SecretType
	RuntimeType  = resource.RuntimeType
	AnyType      = resource.AnyType
)

Variables

This section is empty.

Functions

func CAConfig added in v0.2.11

func CAConfig(caBytes []byte) (*tls.Config, error)

func CaConfigFromFile added in v0.2.11

func CaConfigFromFile(caPath string) (*tls.Config, error)

func GetHTTPConnectionManager

GetHTTPConnectionManager creates a HttpConnectionManager from filter

func TlsConfig added in v0.2.11

func TlsConfig(certBytes, keyBytes, caBytes []byte) (*tls.Config, error)

func TlsConfigFromDir added in v0.2.11

func TlsConfigFromDir(certDir string) (*tls.Config, error)

Types

type ADSC

type ADSC struct {
	XDSClient *XDSClient
	SDSClient *SDSClient

	HandleEDSCDS  func(clusters map[string]*envoy_config_cluster_v3.Cluster)
	HandleCDS     func(clusters map[string]*envoy_config_cluster_v3.Cluster)
	HandleRDS     func(clusters map[string]*envoy_config_route_v3.RouteConfiguration)
	HandleHttpLDS func(listeners map[string]*envoy_config_listener_v3.Listener)
	HandleTcpLDS  func(listeners map[string]*envoy_config_listener_v3.Listener)
	HandleEDS     func(clusters map[string]*envoy_config_endpoint_v3.ClusterLoadAssignment)
	HandleSDS     func(secrets map[string]*envoy_extensions_transport_sockets_tls_v3.Secret)
	// contains filtered or unexported fields
}

func NewADSC

func NewADSC(xdsAddress, sdsAddress string, node *envoy_config_core_v3.Node) *ADSC

func (*ADSC) Run

func (a *ADSC) Run(ctx context.Context) error

type SDSClient added in v0.2.11

type SDSClient struct {
	SDSConfig
	// contains filtered or unexported fields
}

SDSClient implements a client for xDS.

func NewSDSClient added in v0.2.11

func NewSDSClient(url string, tlsConfig *tls.Config, opts *SDSConfig) *SDSClient

NewSDSClient connects to a xDS server, with optional TLS authentication if a cert dir is specified.

func (*SDSClient) Clone added in v0.2.11

func (c *SDSClient) Clone() *SDSClient

Clone the once.

func (*SDSClient) Close added in v0.2.11

func (c *SDSClient) Close() error

Close the once.

func (*SDSClient) Node added in v0.2.11

func (c *SDSClient) Node() *envoy_config_core_v3.Node

func (*SDSClient) Run added in v0.2.11

func (c *SDSClient) Run(ctx context.Context) error

Run the xDS client.

func (*SDSClient) Send added in v0.2.11

func (*SDSClient) SendRsc added in v0.2.11

func (c *SDSClient) SendRsc(typeURL string, rsc []string) error

func (*SDSClient) Start added in v0.2.11

func (c *SDSClient) Start(ctx context.Context) error

type SDSConfig added in v0.2.11

type SDSConfig struct {
	Node           *envoy_config_core_v3.Node
	OnConnect      func(cli *SDSClient) error
	ContextDialer  func(ctx context.Context, address string) (net.Conn, error)
	HandleSDS      func(cli *SDSClient, secrets []*envoy_extensions_transport_sockets_tls_v3.Secret)
	HandleNotFound func(cli *SDSClient, others []*any.Any)
}

SDSConfig for the SDSClient connection.

type XDSClient added in v0.2.11

type XDSClient struct {
	XDSConfig
	// contains filtered or unexported fields
}

XDSClient implements a client for xDS.

func NewXDSClient added in v0.2.11

func NewXDSClient(url string, tlsConfig *tls.Config, opts *XDSConfig) *XDSClient

NewXDSClient connects to a xDS server, with optional TLS authentication if a cert dir is specified.

func (*XDSClient) Clone added in v0.2.11

func (c *XDSClient) Clone() *XDSClient

Clone the once.

func (*XDSClient) Close added in v0.2.11

func (c *XDSClient) Close() error

Close the once.

func (*XDSClient) Node added in v0.2.11

func (c *XDSClient) Node() *envoy_config_core_v3.Node

func (*XDSClient) Run added in v0.2.11

func (c *XDSClient) Run(ctx context.Context) error

Run the xDS client.

func (*XDSClient) Send added in v0.2.11

func (*XDSClient) SendRsc added in v0.2.11

func (c *XDSClient) SendRsc(typeURL string, rsc []string) error

func (*XDSClient) Start added in v0.2.11

func (c *XDSClient) Start(ctx context.Context) error

type XDSConfig added in v0.2.11

type XDSConfig struct {
	Node           *envoy_config_core_v3.Node
	OnConnect      func(cli *XDSClient) error
	ContextDialer  func(ctx context.Context, address string) (net.Conn, error)
	HandleCDS      func(cli *XDSClient, clusters []*envoy_config_cluster_v3.Cluster)
	HandleEDS      func(cli *XDSClient, endpoints []*envoy_config_endpoint_v3.ClusterLoadAssignment)
	HandleLDS      func(cli *XDSClient, listeners []*envoy_config_listener_v3.Listener)
	HandleRDS      func(cli *XDSClient, routes []*envoy_config_route_v3.RouteConfiguration)
	HandleNotFound func(cli *XDSClient, others []*any.Any)
}

XDSConfig for the XDSClient connection.

Jump to

Keyboard shortcuts

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