Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrForcedFailure = errors.New("Failed by endpoint manager")
ErrForcedFailure is an error a Transport can use to represent a forced failure by the publisher
Functions ¶
This section is empty.
Types ¶
type AckEvent ¶
type AckEvent struct {
// contains filtered or unexported fields
}
AckEvent contains information on which events have been acknowledged
func NewAckEvent ¶
NewAckEvent generates a new AckEvent for the given Endpoint
func NewAckEventWithBytes ¶
NewAckEventWithBytes generates a new AckEvent using bytes, conveniently converting them to string and uint32
type Event ¶
type Event interface {
Observer() Observer
}
Event is the interface implemented by all event structures
type Observer ¶
type Observer interface { Pool() *addresspool.Pool EventChan() chan<- Event }
Observer is the interface implemented by the consumer of a transport, to allow the transport to communicate back To all intents and purposes this is the Endpoint
type PongEvent ¶
type PongEvent struct {
// contains filtered or unexported fields
}
PongEvent is received when a transport has responded to a Ping() request
func NewPongEvent ¶
NewPongEvent generates a new PongEvent for the given Endpoint
type StatusChange ¶
type StatusChange int
StatusChange holds a value that represents a change in transport status
const ( Started StatusChange = iota Failed Finished )
Transport status change signals
type StatusEvent ¶
type StatusEvent struct {
// contains filtered or unexported fields
}
StatusEvent contains information about a status change for a transport
func NewStatusEvent ¶
func NewStatusEvent(observer Observer, statusChange StatusChange) *StatusEvent
NewStatusEvent generates a new StatusEvent for the given Observer/Endpoint
func (*StatusEvent) Observer ¶
func (e *StatusEvent) Observer() Observer
Observer returns the endpoint associated with this event
func (*StatusEvent) StatusChange ¶
func (e *StatusEvent) StatusChange() StatusChange
StatusChange returns the status change value
type Transport ¶
type Transport interface { Fail() Ping() error ReloadConfig(interface{}, bool) bool Shutdown() Write(string, []*core.EventDescriptor) error }
Transport is the generic interface that all transports implement
func NewTransport ¶
NewTransport returns a Transport interface initialised from the given Factory