stub

package
v0.0.0-...-f0f593e Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var StubMap *sync.Map

Functions

func GetStubAddress

func GetStubAddress(clientIp string, clientId string) string

Types

type Client

type Client struct {
	ClientId string
	ClientIp string
	Port     uint32
}

type StubConnection

type StubConnection struct {
	Address string
	Conn    pb.MsmControlPlane_SendServer
	Clients map[string]Client
}

func NewStubConnection

func NewStubConnection(address string, conn pb.MsmControlPlane_SendServer) *StubConnection

type StubHandler

type StubHandler struct {
	StubChannels map[string]*model2.StubChannel
	// contains filtered or unexported fields
}

func NewStubHandler

func NewStubHandler(cfg *config.Cfg) *StubHandler

func (*StubHandler) OnAdd

func (s *StubHandler) OnAdd(conn pb.MsmControlPlane_SendServer, stream *pb.Message)

Call when receive ADD event

func (*StubHandler) OnDelete

func (s *StubHandler) OnDelete(connectionKey model.ConnectionKey, conn pb.MsmControlPlane_SendServer)

Call when receive DELETE event

func (*StubHandler) OnRegistration

func (s *StubHandler) OnRegistration(conn pb.MsmControlPlane_SendServer, proxyIp string)

Call when receive REGISTRATION event

Jump to

Keyboard shortcuts

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