Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AMQPConnector ¶ added in v0.11.0
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 ¶ added in v0.11.0
type Closable interface {
Close() error
}
Closable can be closed. E.g. channel, net.Conn
type Dispatcher ¶ added in v0.11.0
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 ¶ added in v0.11.0
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 ¶ added in v0.11.0
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 ¶ added in v0.11.0
TimeoutConn automatically applies a read deadline on a conn upon every read
func NewTimeoutConn ¶ added in v0.11.0
func NewTimeoutConn(conn net.Conn, readTimeout time.Duration) TimeoutConn
Click to show internal directories.
Click to hide internal directories.