Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrConnNotFound will be returned by GetConnection in case the requested connection is not found. ErrConnNotFound = errors.New("clusterconnmanager: cluster connection not found") // ErrIncompatibleProtocol will be returned by GetConnection in case the requested connection protocol version // is incompatible. ErrIncompatibleProtocol = errors.New("clusterconnmanager: incompatible cluster API protocol") )
Functions ¶
This section is empty.
Types ¶
type ComponentRouter ¶
type ComponentRouter interface {
Route(ctx context.Context, stanza stravaganza.Stanza, componentHost string) error
}
ComponentRouter defines component router service.
type Conn ¶
type Conn interface { LocalRouter() LocalRouter ComponentRouter() ComponentRouter StreamManagement() StreamManagement }
Conn defines cluster connection interface.
type LocalRouter ¶
type LocalRouter interface { Route(ctx context.Context, stanza stravaganza.Stanza, username, resource string) error Disconnect(ctx context.Context, username, resource string, streamErr *streamerror.Error) error }
LocalRouter defines local router service.
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager is the cluster connection manager.
func NewManager ¶
NewManager returns a new initialized cluster connection manager.
func (*Manager) GetConnection ¶
GetConnection returns the connection associated to a given cluster instance.
type StreamManagement ¶ added in v0.61.0
type StreamManagement interface {
TransferQueue(ctx context.Context, queueID string) (*StreamQueue, error)
}
StreamManagement defines a stream management service.
type StreamQueue ¶ added in v0.61.0
type StreamQueue struct { // Elements contains the queue elements. Elements []streamqueue.Element // Nonce is the nonce queue byte slice. Nonce []byte // InH is the queue incoming h value. InH uint32 // OutH is the queue outgoing h value. OutH uint32 }
StreamQueue represents a stream managed queue.
Click to show internal directories.
Click to hide internal directories.