Documentation ¶
Index ¶
- Constants
- Variables
- type Client
- func (c *Client) Authenticate() error
- func (c *Client) OnPublish(h TopicHandler)
- func (c *Client) Publish(topicName string, v interface{}, timeout time.Duration) error
- func (c *Client) PublishToOne(topicName string, v interface{}, timeout time.Duration) error
- func (c *Client) Subscribe(topicName string, h TopicHandler, timeout time.Duration) error
- func (c *Client) Unsubscribe(topicName string, timeout time.Duration) error
- type Server
- type Topic
- type TopicAgent
- type TopicHandler
Constants ¶
View Source
const (
// MaxTopicNameLen .
MaxTopicNameLen = 1024
)
Variables ¶
View Source
var ( // ErrInvalidPassword . ErrInvalidPassword = errors.New("invalid password") // ErrInvalidTopicEmpty . ErrInvalidTopicEmpty = errors.New("invalid topic, should not be \"\"") // ErrInvalidTopicBytes . ErrInvalidTopicBytes = errors.New("invalid topic bytes, should be more than 10 bytes") // ErrInvalidTopicNameLength . ErrInvalidTopicNameLength = errors.New("invalid topic name length, should not be more than 1024") )
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client .
func (*Client) PublishToOne ¶
PublishToOne .
type Server ¶
Server .
func (*Server) PublishToOne ¶
PublishToOne topic
type Topic ¶
type Topic struct { Name string Data []byte Timestamp int64 // contains filtered or unexported fields }
Topic .
type TopicAgent ¶
type TopicAgent struct { Name string // contains filtered or unexported fields }
TopicAgent .
func (*TopicAgent) Publish ¶
func (t *TopicAgent) Publish(s *Server, from *arpc.Client, topic *Topic)
Publish .
func (*TopicAgent) PublishToOne ¶
func (t *TopicAgent) PublishToOne(s *Server, from *arpc.Client, topic *Topic)
PublishToOne .
Click to show internal directories.
Click to hide internal directories.