Versions in this module Expand all Collapse all v1 v1.2.7 Nov 3, 2020 Changes in this version + const CommandIdentify + func NewTLSConfig(config TLSConfig) (*tls.Config, error) type ConsumerConfig + TLS TLSConfig type Identify + Deflate bool + DeflateLevel int + Snappy bool + TLSConfig *tls.Config + TLSV1 bool + type IdentityResponse struct + AuthRequired bool + Deflate bool + MaxRdyCount int + Snappy bool + TLS bool type ProducerConfig + Identify Identify + TLS TLSConfig + type TLSConfig struct + CertFile string + KeyFile string + RootFile string v1.2.6 Oct 30, 2020 v1.2.5 Oct 30, 2020 Changes in this version + const DefaultDrainTimeout type ConsumerConfig + DrainTimeout time.Duration type Identify + MessageTimeout time.Duration v1.0.0 Aug 31, 2017 Changes in this version + const DefaultDialTimeout + const DefaultLookupTimeout + const DefaultMaxConcurrency + const DefaultMaxInFlight + const DefaultMaxRetryTimeout + const DefaultMinRetryTimeout + const DefaultReadTimeout + const DefaultUserAgent + const DefaultWriteTimeout + const NoTimeout + func RateLimit(limit int, messages <-chan Message) <-chan Message + type Auth struct + Secret string + func (c Auth) Name() string + func (c Auth) Write(w *bufio.Writer) (err error) + type Client struct + Address string + Scheme string + UserAgent string + func (c *Client) CreateChannel(topic string, channel string) error + func (c *Client) CreateTopic(topic string) error + func (c *Client) DeleteChannel(topic string, channel string) error + func (c *Client) DeleteTopic(topic string) error + func (c *Client) EmptyChannel(topic string, channel string) error + func (c *Client) EmptyTopic(topic string) error + func (c *Client) MutliPublish(topic string, messages ...[]byte) (err error) + func (c *Client) PauseChannel(topic string, channel string) error + func (c *Client) PauseTopic(topic string) error + func (c *Client) Ping() error + func (c *Client) Publish(topic string, message []byte) (err error) + func (c *Client) UnpauseChannel(topic string, channel string) error + func (c *Client) UnpauseTopic(topic string) error + type Cls struct + func (c Cls) Name() string + func (c Cls) Write(w *bufio.Writer) (err error) + type Command interface + Name func() string + Write func(*bufio.Writer) error + func ReadCommand(r *bufio.Reader) (cmd Command, err error) + type Conn struct + func Dial(addr string) (c *Conn, err error) + func DialTimeout(addr string, timeout time.Duration) (c *Conn, err error) + func NewConn(conn net.Conn) *Conn + func (c *Conn) Close() (err error) + func (c *Conn) LocalAddr() net.Addr + func (c *Conn) Read(b []byte) (n int, err error) + func (c *Conn) ReadCommand() (cmd Command, err error) + func (c *Conn) ReadFrame() (frame Frame, err error) + func (c *Conn) RemoteAddr() net.Addr + func (c *Conn) SetDeadline(t time.Time) (err error) + func (c *Conn) SetReadDeadline(t time.Time) (err error) + func (c *Conn) SetWriteDeadline(t time.Time) (err error) + func (c *Conn) Write(b []byte) (n int, err error) + func (c *Conn) WriteCommand(cmd Command) (err error) + func (c *Conn) WriteFrame(frame Frame) (err error) + type Consumer struct + func NewConsumer(config ConsumerConfig) (c *Consumer, err error) + func StartConsumer(config ConsumerConfig) (c *Consumer, err error) + func (c *Consumer) Messages() <-chan Message + func (c *Consumer) Start() + func (c *Consumer) Stop() + type ConsumerConfig struct + Address string + Channel string + DialTimeout time.Duration + Identify Identify + Lookup []string + MaxInFlight int + ReadTimeout time.Duration + Topic string + WriteTimeout time.Duration + type Error string + const ErrAuthFailed + const ErrBadBody + const ErrBadChannel + const ErrBadMessage + const ErrBadTopic + const ErrFinFailed + const ErrInvalid + const ErrMPubFailed + const ErrPubFailed + const ErrReqFailed + const ErrTouchFailed + const ErrUnauthorized + func (e Error) Error() string + func (e Error) FrameType() FrameType + func (e Error) String() string + func (e Error) Write(w *bufio.Writer) (err error) + type Fin struct + MessageID MessageID + func (c Fin) Name() string + func (c Fin) Write(w *bufio.Writer) (err error) + type Frame interface + FrameType func() FrameType + Write func(*bufio.Writer) error + func ReadFrame(r *bufio.Reader) (frame Frame, err error) + type FrameType int + const FrameTypeError + const FrameTypeMessage + const FrameTypeResponse + func (t FrameType) String() string + type Identify struct + ClientID string + Hostname string + UserAgent string + func (c Identify) Name() string + func (c Identify) Write(w *bufio.Writer) (err error) + type LookupClient struct + Addresses []string + Scheme string + UserAgent string + func (c *LookupClient) Lookup(topic string) (result LookupResult, err error) + type LookupResult struct + Channels []string + Producers []ProducerInfo + type MPub struct + Messages [][]byte + Topic string + func (c MPub) Name() string + func (c MPub) Write(w *bufio.Writer) (err error) + type Message struct + Attempts uint16 + Body []byte + ID MessageID + Timestamp time.Time + func NewMessage(id MessageID, body []byte, cmdChan chan<- Command) *Message + func (m *Message) Complete() bool + func (m *Message) Finish() + func (m *Message) Requeue(timeout time.Duration) + func (m Message) FrameType() FrameType + func (m Message) Write(w *bufio.Writer) (err error) + type MessageID uint64 + func ParseMessageID(s string) (id MessageID, err error) + func (id MessageID) String() string + func (id MessageID) WriteTo(w io.Writer) (int64, error) + type Nop struct + func (c Nop) Name() string + func (c Nop) Write(w *bufio.Writer) (err error) + type Producer struct + func NewProducer(config ProducerConfig) (p *Producer, err error) + func StartProducer(config ProducerConfig) (p *Producer, err error) + func (p *Producer) Connected() bool + func (p *Producer) Publish(message []byte) (err error) + func (p *Producer) PublishTo(topic string, message []byte) (err error) + func (p *Producer) Requests() chan<- ProducerRequest + func (p *Producer) Start() + func (p *Producer) Stop() + type ProducerConfig struct + Address string + DialTimeout time.Duration + MaxConcurrency int + ReadTimeout time.Duration + Topic string + WriteTimeout time.Duration + type ProducerInfo struct + BroadcastAddress string + Hostname string + HttpPort int + RemoteAddress string + TcpPort int + Version string + type ProducerRequest struct + Deadline time.Time + Message []byte + Response chan<- error + Topic string + type Pub struct + Message []byte + Topic string + func (c Pub) Name() string + func (c Pub) Write(w *bufio.Writer) (err error) + type Rdy struct + Count int + func (c Rdy) Name() string + func (c Rdy) Write(w *bufio.Writer) (err error) + type Req struct + MessageID MessageID + Timeout time.Duration + func (c Req) Name() string + func (c Req) Write(w *bufio.Writer) (err error) + type Response string + const CloseWait + const Heartbeat + const OK + func (r Response) FrameType() FrameType + func (r Response) String() string + func (r Response) Write(w *bufio.Writer) (err error) + type Sub struct + Channel string + Topic string + func (c Sub) Name() string + func (c Sub) Write(w *bufio.Writer) (err error) + type Touch struct + MessageID MessageID + func (c Touch) Name() string + func (c Touch) Write(w *bufio.Writer) (err error) + type UnknownFrame struct + Data []byte + Type FrameType + func (f UnknownFrame) FrameType() FrameType + func (f UnknownFrame) Write(w *bufio.Writer) (err error)