Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IpIntToString ¶
func IpStringToInt ¶
Types ¶
type BusImplRabbitMQ ¶
type BusImplRabbitMQ struct {
// contains filtered or unexported fields
}
func NewBusImplRabbitMQ ¶
func NewBusImplRabbitMQ(selfBusId uint32, onRecvMsg MsgHandler, rabbitmqAddr string) *BusImplRabbitMQ
func (*BusImplRabbitMQ) SelfBusId ¶
func (b *BusImplRabbitMQ) SelfBusId() uint32
func (*BusImplRabbitMQ) Send ¶
func (b *BusImplRabbitMQ) Send(dstBusId uint32, data1 []byte, data2 []byte) error
func (*BusImplRabbitMQ) SetReceiver ¶
func (b *BusImplRabbitMQ) SetReceiver(onRecvMsg MsgHandler)
type IBus ¶
type IBus interface { SelfBusId() uint32 Send(dstBusId uint32, data1 []byte, data2 []byte) error // 默认规则: // 1. onRecvMsg由实现类的内部协程调用,且只会由一个协程调用。 // 2. data的所有权,转交给onRecvMsg。 // 如有例外,实现类需特殊说明。 SetReceiver(onRecvMsg MsgHandler) }
需保证协程并发安全
type MsgHandler ¶
Click to show internal directories.
Click to hide internal directories.