Documentation ¶
Index ¶
Constants ¶
View Source
const ( LocalInPortId = 0 //Local InPort ID, receive the message from local RemoteInPortId = 1 //Remote InPort ID, receive the message from remote LocalOutPortId = 0 //Local OutPort ID RemoteOutPortId = 1 //Remote OutPort ID )
common const value
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InPort ¶
type InPort struct {
// contains filtered or unexported fields
}
InPort is switch in port. Message will be send to InPort, and then switch Read the message from InPort
type OutPort ¶
type OutPort struct {
// contains filtered or unexported fields
}
InPort is switch out port. Switch will broadcast message to out port
func (*OutPort) BindToPort ¶
func (outPort *OutPort) BindToPort(outPutFunc OutPutFunc) error
BindToPort bind a new OutPutFunc to this OutPort. Return error if bind failed
type OutPutFunc ¶
type OutPutFunc func(msg interface{}) error
OutPutFunc is binded to switch out port, and OutPort will call OutPutFunc when receive a message from switch
Click to show internal directories.
Click to hide internal directories.