mux

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2021 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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, config multizone.KdsServerConfig, metrics core_metrics.Metrics) component.Component

Types

type Callbacks

type Callbacks interface {
	OnSessionStarted(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
	Done() <-chan struct{}
	Error() error
}

func NewSession

func NewSession(peerID string, stream MultiplexStream, stop <-chan struct{}) Session

Jump to

Keyboard shortcuts

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