message

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrInvalidMessage is return if the message is invalid
	ErrInvalidMessage = errors.New("invalid message")
	// ErrUndefinedMessage is return if the message is not defined
	ErrUndefinedMessage = errors.New("undefined message")
	// ErrFullChannel is returned if the message channel is full
	ErrFullChannel = errors.New("full channel")
)
View Source
var (
	ErrOldMessage             = errors.New("old message")
	ErrInvalidStateTransition = errors.New("invalid state transition")
	ErrDupMsg                 = errors.New("duplicate message")
)

Functions

This section is empty.

Types

type MsgChans

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

func NewMsgChans

func NewMsgChans(bufferLen uint32, ts ...types.MessageType) *MsgChans

func (*MsgChans) Pop

func (*MsgChans) Push

func (m *MsgChans) Push(msg types.Message) error

type MsgMain

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

func NewMsgMain

func NewMsgMain(id string, peerNum uint32, listener types.StateChangedListener, initHandler types.Handler, msgTypes ...types.MessageType) *MsgMain

func (*MsgMain) AddMessage

func (t *MsgMain) AddMessage(msg types.Message) error

func (*MsgMain) GetHandler

func (t *MsgMain) GetHandler() types.Handler

func (*MsgMain) GetState

func (t *MsgMain) GetState() types.MainState

func (*MsgMain) Start

func (t *MsgMain) Start()

func (*MsgMain) Stop

func (t *MsgMain) Stop()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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