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 }
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.
Click to show internal directories.
Click to hide internal directories.