mux

package
v1.5.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2022 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KDSVersionHeaderKey = "kds-version"
	KDSVersionV2        = "v2"
	KDSVersionV3        = "v3"
)

Variables

This section is empty.

Functions

func DiscoveryRequestV2 added in v1.8.1

func DiscoveryRequestV2(request *envoy_sd_v3.DiscoveryRequest) *envoy_api_v2.DiscoveryRequest

func DiscoveryRequestV3 added in v1.8.1

func DiscoveryRequestV3(request *envoy_api_v2.DiscoveryRequest) *envoy_sd_v3.DiscoveryRequest

func DiscoveryResponseV2 added in v1.8.1

func DiscoveryResponseV2(response *envoy_sd_v3.DiscoveryResponse) *envoy_api_v2.DiscoveryResponse

func DiscoveryResponseV3 added in v1.8.1

func DiscoveryResponseV3(response *envoy_api_v2.DiscoveryResponse) *envoy_sd_v3.DiscoveryResponse

func KDSVersion added in v1.8.1

func KDSVersion(ctx context.Context) string

func NewClient

func NewClient(globalURL string, clientID string, callbacks Callbacks, config multizone.KdsClientConfig, metrics metrics.Metrics, ctx context.Context) component.Component

func NewServer

func NewServer(callbacks Callbacks, filters []Filter, config multizone.KdsServerConfig, metrics core_metrics.Metrics) component.Component

func UnsupportedKDSVersion added in v1.8.1

func UnsupportedKDSVersion(version string) error

Types

type Callbacks

type Callbacks interface {
	OnSessionStarted(session Session) error
}

type Filter added in v1.8.1

type Filter interface {
	InterceptSession(session Session) error
}

type MultiplexStream

type MultiplexStream interface {
	Send(*mesh_proto.Message) error
	Recv() (*mesh_proto.Message, error)
	Context() context.Context
}

type OnSessionStartedFunc

type OnSessionStartedFunc func(session Session) error

func (OnSessionStartedFunc) OnSessionStarted

func (f OnSessionStartedFunc) OnSessionStarted(session Session) error

type Session

type Session interface {
	ServerStream() mesh_proto.KumaDiscoveryService_StreamKumaResourcesServer
	ClientStream() mesh_proto.KumaDiscoveryService_StreamKumaResourcesClient
	PeerID() string
	Error() <-chan error
}

func NewSession

func NewSession(peerID string, stream MultiplexStream) Session

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳