Documentation ¶
Index ¶
- type Channel
- func (c *Channel) AddClient(client *Client) error
- func (c *Channel) Close() error
- func (c *Channel) Delete() error
- func (c *Channel) Empty()
- func (c *Channel) Exiting() bool
- func (c *Channel) GetMemoryMsgChan() chan *Message
- func (c *Channel) GetName() string
- func (c *Channel) PutMessage(m *Message) error
- func (c *Channel) RemoveClient(clientID int64)
- func (c *Channel) RequeueMessage(clientID int64, id protocol.MessageID) error
- func (c *Channel) StartInFlight(msg *Message, clientID int64)
- type ChannelMetadata
- type Client
- type EMQD
- type HTTPServer
- type IdentifyData
- type LookupPeer
- type Message
- type Metadata
- type Options
- type PeerInfo
- type Protocol
- func (p *Protocol) Exec(client *Client, params [][]byte) ([]byte, error)
- func (p *Protocol) IDENTITY(client *Client, params [][]byte) ([]byte, error)
- func (p *Protocol) IOLoop(c protocol.Client) error
- func (p *Protocol) MessagePump(client *Client, startedChan chan bool)
- func (p *Protocol) NOP(client *Client, params [][]byte) ([]byte, error)
- func (p *Protocol) NewClient(conn net.Conn) protocol.Client
- func (p *Protocol) PUB(client *Client, params [][]byte) ([]byte, error)
- func (p *Protocol) REQ(client *Client, params [][]byte) ([]byte, error)
- func (p *Protocol) SUB(client *Client, params [][]byte) ([]byte, error)
- func (p *Protocol) Send(client *Client, frameType int32, data []byte) error
- func (p *Protocol) SendMessage(client *Client, msg *Message) error
- type Resp
- type TCPServer
- type Topic
- func (t *Topic) Close() error
- func (t *Topic) Delete() error
- func (t *Topic) Exiting() bool
- func (t *Topic) GenerateID() protocol.MessageID
- func (t *Topic) GetChannel(channelName string) *Channel
- func (t *Topic) GetChans() []*Channel
- func (t *Topic) GetName() string
- func (t *Topic) PutMessage(m *Message) error
- func (t *Topic) Start()
- type TopicMetadata
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Channel ¶
type Channel struct {
// contains filtered or unexported fields
}
func NewChannel ¶
func (*Channel) GetMemoryMsgChan ¶
func (*Channel) PutMessage ¶
func (*Channel) RemoveClient ¶
func (*Channel) RequeueMessage ¶
func (*Channel) StartInFlight ¶
type ChannelMetadata ¶
type ChannelMetadata struct {
Name string `json:"name"`
}
type EMQD ¶
type EMQD struct {
// contains filtered or unexported fields
}
func (*EMQD) GetMetadata ¶
func (*EMQD) LoadMetadata ¶
func (*EMQD) PersistMetadata ¶
type HTTPServer ¶
type HTTPServer struct {
// contains filtered or unexported fields
}
func (*HTTPServer) ServeHTTP ¶
func (s *HTTPServer) ServeHTTP(w http.ResponseWriter, req *http.Request)
type IdentifyData ¶
type IdentifyData struct { }
type LookupPeer ¶
type LookupPeer struct {
// contains filtered or unexported fields
}
func NewLookupPeer ¶
func NewLookupPeer(addr string) *LookupPeer
func (*LookupPeer) Close ¶
func (lp *LookupPeer) Close() error
func (*LookupPeer) Connect ¶
func (lp *LookupPeer) Connect(e *EMQD) error
type Metadata ¶
type Metadata struct {
Topics []TopicMetadata `json:"topics"`
}
type Options ¶
type Options struct { ID int64 TCPAddress string HTTPAddress string LookupdTCPAddresses []string DataPath string MemQueueSize int64 MinMsgSize int64 MaxMsgSize int64 MaxBytesPerFile int64 SyncEvery int64 SyncTimeout time.Duration }
func NewOptions ¶
func NewOptions() *Options
type Protocol ¶
type Protocol struct {
// contains filtered or unexported fields
}
协议结构体 用来组织emqd和client的关联处理
func (*Protocol) MessagePump ¶
type Topic ¶
type Topic struct { MessageID uint64 // contains filtered or unexported fields }
func (*Topic) GetChannel ¶
func (*Topic) PutMessage ¶
type TopicMetadata ¶
type TopicMetadata struct { Name string `json:"name"` Channels []ChannelMetadata `json:"channels"` }
Click to show internal directories.
Click to hide internal directories.