Documentation
¶
Index ¶
- func CRC32(str string) uint32
- func MD5(str string) string
- func SlotBalance(str string, slotCount uint32) uint32
- type Broker
- func (broker *Broker) GetTotalConsumer() map[string]uint64
- func (broker *Broker) GetTotalTopic() uint64
- func (broker *Broker) Publish(topicID string, from Session, message interface{})
- func (broker *Broker) Subscribe(topicID string, consumer *Consumer)
- func (broker *Broker) Unsubscribe(topicID string, consumerID string)
- type Consumer
- type Session
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Broker ¶
type Broker struct {
// contains filtered or unexported fields
}
Broker Broker
func NewBroker ¶
func NewBroker(slotCount uint32, broadcast func(topicID string, to map[string]*Consumer, from Session, message interface{})) *Broker
NewBroker NewBroker
func (*Broker) GetTotalConsumer ¶
GetTotalConsumer GetTotalConsumer
func (*Broker) GetTotalTopic ¶
GetTotalTopic GetTotalTopic
func (*Broker) Unsubscribe ¶
Unsubscribe Unsubscribe
type Consumer ¶
type Consumer struct {
// contains filtered or unexported fields
}
Consumer Consumer
func (*Consumer) SendMarshalledData ¶
SendMarshalledData SendMarshalledData
Click to show internal directories.
Click to hide internal directories.