message

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2019 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Msgcore

func Msgcore() *msgcore

get the msgcore singleton

Types

type Handleable

type Handleable interface {
	DataHandle(data interface{})
	StopHandle()
}

each message must implement this interface to handle data and stop

type Handler

type Handler interface {
	Handle(h Handleable)
}

each message must implement this interface to handle message

type Message

type Message interface {
	Send() error // send message
	Close()      // close message processing
}

each message must implement this interface external interface

type MsgPriv

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

private message struct The basic structure and interface of the message are implemented and could be inherited

func NewMsgPriv

func NewMsgPriv() *MsgPriv

func (MsgPriv) Close

func (msg MsgPriv) Close()

func (MsgPriv) Handle

func (msg MsgPriv) Handle(h Handleable)

func (MsgPriv) Send

func (msg MsgPriv) Send() error

Jump to

Keyboard shortcuts

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