Documentation ¶
Index ¶
Constants ¶
View Source
const (
// ServerPort is the port used when initializing the control-protocol server
ServerPort = 8085
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AsyncHandlerFunc ¶
type AsyncHandlerFunc = func(ctx context.Context, commandMessage ctrlservice.AsyncCommandMessage)
AsyncHandlerFunc is an alias that matches the type used in the control-protocol's NewAsyncCommandHandler function
type ServerHandler ¶
type ServerHandler interface { Shutdown(timeout time.Duration) AddAsyncHandler(opcode ctrl.OpCode, resultOpcode ctrl.OpCode, payloadType message.AsyncCommand, handler AsyncHandlerFunc) AddSyncHandler(opcode ctrl.OpCode, handler ctrl.MessageHandlerFunc) RemoveHandler(opcode ctrl.OpCode) }
ServerHandler defines the interface for adding and removing sync or async handlers from a control-protocol server
func NewServerHandler ¶
func NewServerHandler(ctx context.Context, port int) (ServerHandler, error)
NewServerHandler starts a control-protocol server on the specified port and returns the serverHandlerImpl as a ServerHandler interface
Click to show internal directories.
Click to hide internal directories.