Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AMQPConnector ¶
AMQPConnector connects using the given configuration
Types ¶
type Amqp ¶
type Amqp struct {
// contains filtered or unexported fields
}
Amqp is a plugin that consumes from an amqp broker
type Closable ¶
type Closable interface {
Close() error
}
Closable can be closed. E.g. channel, net.Conn
type Dispatcher ¶
type Dispatcher interface { // Dispatch runs data validation and processing // implementations must not reuse buf after returning Dispatch(buf []byte) // IncNumInvalid marks protocol-level decoding failures // does not apply to carbon as the protocol is trivial and any parse failure // is a message failure (handled in Dispatch) IncNumInvalid() }
type Handler ¶
Handler is responsible for reading input. It should call: Dispatcher.IncNumInvalid upon protocol errors Dispatcher.Dispatch to process data that's protocol-valid
type Listener ¶
type Listener struct { Handler Handler HandleConn func(l *Listener, c net.Conn) HandleData func(l *Listener, data []byte, src net.Addr) // contains filtered or unexported fields }
Listener takes care of TCP/UDP networking and relies on the Handler to take care of reading data
func NewListener ¶
NewListener creates a new listener.
type Pickle ¶
type Pickle struct {
// contains filtered or unexported fields
}
func NewPickle ¶
func NewPickle(dispatcher Dispatcher) *Pickle
type Plain ¶
type Plain struct {
// contains filtered or unexported fields
}
func NewPlain ¶
func NewPlain(dispatcher Dispatcher) *Plain
type TimeoutConn ¶
TimeoutConn automatically applies a read deadline on a conn upon every read
func NewTimeoutConn ¶
func NewTimeoutConn(conn net.Conn, readTimeout time.Duration) TimeoutConn
Click to show internal directories.
Click to hide internal directories.