mux

package
v0.0.0-...-a4cc684 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DDSVersionHeaderKey = "dds-version"
	DDSVersionV3        = "v3"
)

Variables

This section is empty.

Functions

func NewClient

func NewClient(
	ctx context.Context,
	globalURL string,
	clientID string,
	globalToZoneCb OnGlobalToZoneSyncStartedFunc,
	zoneToGlobalCb OnZoneToGlobalSyncStartedFunc,
	config multizone.DdsClientConfig,
) component.Component

func NewServer

func NewServer(
	filters []Filter,
	streamInterceptors []grpc.StreamServerInterceptor,
	unaryInterceptors []grpc.UnaryServerInterceptor,
	config multizone.DdsServerConfig,
	serviceServer *service.GlobalDDSServiceServer,
	ddsSyncServiceServer *DDSSyncServiceServer,
) component.Component

Types

type DDSSyncServiceServer

type DDSSyncServiceServer struct {
	mesh_proto.UnimplementedDDSSyncServiceServer
	// contains filtered or unexported fields
}

func NewDDSSyncServiceServer

func NewDDSSyncServiceServer(ctx context.Context, globalToZoneCb OnGlobalToZoneSyncConnectFunc, zoneToGlobalCb OnZoneToGlobalSyncConnectFunc, filters []Filter, extensions context.Context, eventBus events.EventBus) *DDSSyncServiceServer

func (*DDSSyncServiceServer) GlobalToZoneSync

func (*DDSSyncServiceServer) ZoneToGlobalSync

type Filter

type Filter interface {
	InterceptServerStream(stream grpc.ServerStream) error
	InterceptClientStream(stream grpc.ClientStream) error
}

type OnGlobalToZoneSyncConnectFunc

type OnGlobalToZoneSyncConnectFunc func(stream mesh_proto.DDSSyncService_GlobalToZoneSyncServer, errorCh chan error)

func (OnGlobalToZoneSyncConnectFunc) OnGlobalToZoneSyncConnect

func (f OnGlobalToZoneSyncConnectFunc) OnGlobalToZoneSyncConnect(stream mesh_proto.DDSSyncService_GlobalToZoneSyncServer, errorChan chan error)

type OnGlobalToZoneSyncStartedFunc

type OnGlobalToZoneSyncStartedFunc func(session mesh_proto.DDSSyncService_GlobalToZoneSyncClient, errorCh chan error)

func (OnGlobalToZoneSyncStartedFunc) OnGlobalToZoneSyncStarted

func (f OnGlobalToZoneSyncStartedFunc) OnGlobalToZoneSyncStarted(session mesh_proto.DDSSyncService_GlobalToZoneSyncClient, errorCh chan error)

type OnZoneToGlobalSyncConnectFunc

type OnZoneToGlobalSyncConnectFunc func(stream mesh_proto.DDSSyncService_ZoneToGlobalSyncServer, errorCh chan error)

func (OnZoneToGlobalSyncConnectFunc) OnZoneToGlobalSyncConnect

func (f OnZoneToGlobalSyncConnectFunc) OnZoneToGlobalSyncConnect(stream mesh_proto.DDSSyncService_ZoneToGlobalSyncServer, errorCh chan error)

type OnZoneToGlobalSyncStartedFunc

type OnZoneToGlobalSyncStartedFunc func(session mesh_proto.DDSSyncService_ZoneToGlobalSyncClient, errorCh chan error)

func (OnZoneToGlobalSyncStartedFunc) OnZoneToGlobalSyncStarted

func (f OnZoneToGlobalSyncStartedFunc) OnZoneToGlobalSyncStarted(session mesh_proto.DDSSyncService_ZoneToGlobalSyncClient, errorCh chan error)

type ZoneWatch

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

func (*ZoneWatch) NeedLeaderElection

func (zw *ZoneWatch) NeedLeaderElection() bool

func (*ZoneWatch) Start

func (zw *ZoneWatch) Start(stop <-chan struct{}) error

Jump to

Keyboard shortcuts

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