Documentation ¶
Index ¶
- Variables
- func HTTPServer(s *httpServer) error
- func TCPServer(listener net.Listener, handler TCPHandler, logger *zap.Logger) error
- type Conn
- func (c *Conn) Close() error
- func (c *Conn) DeleteSubTopic(ctx context.Context, topicName string)
- func (c *Conn) Flush() error
- func (c *Conn) ID() uint64
- func (c *Conn) IOLoop(ctx context.Context) error
- func (c *Conn) Kind() topic.SubscriberKind
- func (c *Conn) LUID() uint64
- func (c *Conn) Send(ctx context.Context, b []byte) error
- func (c *Conn) SendMessage(ctx context.Context, msg *topic.Message) error
- func (c *Conn) StoreSubTopic(ctx context.Context, topicName string, ssid []uint64)
- type MessageIDRing
- type Server
- type TCPHandler
Constants ¶
This section is empty.
Variables ¶
View Source
var MaxTime time.Time = time.Unix(1<<63-1, 0)
View Source
var ZeroTime time.Time
Functions ¶
func HTTPServer ¶
func HTTPServer(s *httpServer) error
Types ¶
type Conn ¶
type Conn struct { // Meta mutext MetaLock sync.Mutex HeartbeatTimeout time.Duration FlushInterval time.Duration PollSubscribeMessageInterval time.Duration ExitChan chan int // contains filtered or unexported fields }
Conn is the broker connection.
func (*Conn) Kind ¶
func (c *Conn) Kind() topic.SubscriberKind
func (*Conn) SendMessage ¶
SendMessage sends only a *publish* message to the client.
type MessageIDRing ¶
func NewMessageIDRing ¶
func NewMessageIDRing() *MessageIDRing
func (*MessageIDRing) FreeID ¶
func (r *MessageIDRing) FreeID(mid uint16)
func (*MessageIDRing) GetID ¶
func (r *MessageIDRing) GetID() (uint16, error)
type Server ¶
type Server struct { MStore storage.MStorage SStore storage.SStorage // contains filtered or unexported fields }
Server that backs the broker.
type TCPHandler ¶
TCPHandler is the interface for handling TCP connections.
Click to show internal directories.
Click to hide internal directories.