Documentation ¶
Index ¶
- Variables
- func RegisterComponentRouterServer(s *grpc.Server, srv ComponentRouterServer)
- func RegisterLocalRouterServer(s *grpc.Server, srv LocalRouterServer)
- type ComponentRouteRequest
- func (*ComponentRouteRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ComponentRouteRequest) GetStanza() *stravaganza.PBElement
- func (*ComponentRouteRequest) ProtoMessage()
- func (x *ComponentRouteRequest) ProtoReflect() protoreflect.Message
- func (x *ComponentRouteRequest) Reset()
- func (x *ComponentRouteRequest) String() string
- type ComponentRouteResponse
- type ComponentRouterClient
- type ComponentRouterServer
- type LocalDisconnectRequest
- func (*LocalDisconnectRequest) Descriptor() ([]byte, []int)deprecated
- func (x *LocalDisconnectRequest) GetResource() string
- func (x *LocalDisconnectRequest) GetStreamError() *StreamError
- func (x *LocalDisconnectRequest) GetUsername() string
- func (*LocalDisconnectRequest) ProtoMessage()
- func (x *LocalDisconnectRequest) ProtoReflect() protoreflect.Message
- func (x *LocalDisconnectRequest) Reset()
- func (x *LocalDisconnectRequest) String() string
- type LocalDisconnectResponse
- type LocalRouteRequest
- func (*LocalRouteRequest) Descriptor() ([]byte, []int)deprecated
- func (x *LocalRouteRequest) GetResource() string
- func (x *LocalRouteRequest) GetStanza() *stravaganza.PBElement
- func (x *LocalRouteRequest) GetUsername() string
- func (*LocalRouteRequest) ProtoMessage()
- func (x *LocalRouteRequest) ProtoReflect() protoreflect.Message
- func (x *LocalRouteRequest) Reset()
- func (x *LocalRouteRequest) String() string
- type LocalRouteResponse
- type LocalRouterClient
- type LocalRouterServer
- type StreamError
- func (*StreamError) Descriptor() ([]byte, []int)deprecated
- func (x *StreamError) GetApplicationElement() *stravaganza.PBElement
- func (x *StreamError) GetLang() string
- func (x *StreamError) GetReason() StreamErrorReason
- func (x *StreamError) GetText() string
- func (*StreamError) ProtoMessage()
- func (x *StreamError) ProtoReflect() protoreflect.Message
- func (x *StreamError) Reset()
- func (x *StreamError) String() string
- type StreamErrorReason
- func (StreamErrorReason) Descriptor() protoreflect.EnumDescriptor
- func (x StreamErrorReason) Enum() *StreamErrorReason
- func (StreamErrorReason) EnumDescriptor() ([]byte, []int)deprecated
- func (x StreamErrorReason) Number() protoreflect.EnumNumber
- func (x StreamErrorReason) String() string
- func (StreamErrorReason) Type() protoreflect.EnumType
- type UnimplementedComponentRouterServer
- type UnimplementedLocalRouterServer
Constants ¶
This section is empty.
Variables ¶
var ( StreamErrorReason_name = map[int32]string{ 0: "STREAM_ERROR_REASON_INVALID_XML", 1: "STREAM_ERROR_REASON_INVALID_NAMESPACE", 2: "STREAM_ERROR_REASON_HOST_UNKNOWN", 3: "STREAM_ERROR_REASON_CONFLICT", 4: "STREAM_ERROR_REASON_INVALID_FROM", 5: "STREAM_ERROR_REASON_POLICY_VIOLATION", 6: "STREAM_ERROR_REASON_REMOTE_CONNECTION_FAILED", 7: "STREAM_ERROR_REASON_CONNECTION_TIMEOUT", 8: "STREAM_ERROR_REASON_UNSUPPORTED_STANZA_TYPE", 9: "STREAM_ERROR_REASON_UNSUPPORTED_VERSION", 10: "STREAM_ERROR_REASON_NOT_AUTHORIZED", 11: "STREAM_ERROR_REASON_RESOURCE_CONSTRAINT", 12: "STREAM_ERROR_REASON_SYSTEM_SHUTDOWN", 13: "STREAM_ERROR_REASON_UNDEFINED_CONDITION", 14: "STREAM_ERROR_REASON_INTERNAL_SERVER_ERROR", } StreamErrorReason_value = map[string]int32{ "STREAM_ERROR_REASON_INVALID_XML": 0, "STREAM_ERROR_REASON_INVALID_NAMESPACE": 1, "STREAM_ERROR_REASON_HOST_UNKNOWN": 2, "STREAM_ERROR_REASON_CONFLICT": 3, "STREAM_ERROR_REASON_INVALID_FROM": 4, "STREAM_ERROR_REASON_POLICY_VIOLATION": 5, "STREAM_ERROR_REASON_REMOTE_CONNECTION_FAILED": 6, "STREAM_ERROR_REASON_CONNECTION_TIMEOUT": 7, "STREAM_ERROR_REASON_UNSUPPORTED_STANZA_TYPE": 8, "STREAM_ERROR_REASON_UNSUPPORTED_VERSION": 9, "STREAM_ERROR_REASON_NOT_AUTHORIZED": 10, "STREAM_ERROR_REASON_RESOURCE_CONSTRAINT": 11, "STREAM_ERROR_REASON_SYSTEM_SHUTDOWN": 12, "STREAM_ERROR_REASON_UNDEFINED_CONDITION": 13, "STREAM_ERROR_REASON_INTERNAL_SERVER_ERROR": 14, } )
Enum value maps for StreamErrorReason.
var File_cluster_proto protoreflect.FileDescriptor
Functions ¶
func RegisterComponentRouterServer ¶
func RegisterComponentRouterServer(s *grpc.Server, srv ComponentRouterServer)
func RegisterLocalRouterServer ¶
func RegisterLocalRouterServer(s *grpc.Server, srv LocalRouterServer)
Types ¶
type ComponentRouteRequest ¶
type ComponentRouteRequest struct { // stanza contains the routed XMPP stanza. Stanza *stravaganza.PBElement `protobuf:"bytes,1,opt,name=stanza,proto3" json:"stanza,omitempty"` // contains filtered or unexported fields }
ComponentRouteRequest is the parameter message for ComponentRouter Route rpc.
func (*ComponentRouteRequest) Descriptor
deprecated
func (*ComponentRouteRequest) Descriptor() ([]byte, []int)
Deprecated: Use ComponentRouteRequest.ProtoReflect.Descriptor instead.
func (*ComponentRouteRequest) GetStanza ¶
func (x *ComponentRouteRequest) GetStanza() *stravaganza.PBElement
func (*ComponentRouteRequest) ProtoMessage ¶
func (*ComponentRouteRequest) ProtoMessage()
func (*ComponentRouteRequest) ProtoReflect ¶
func (x *ComponentRouteRequest) ProtoReflect() protoreflect.Message
func (*ComponentRouteRequest) Reset ¶
func (x *ComponentRouteRequest) Reset()
func (*ComponentRouteRequest) String ¶
func (x *ComponentRouteRequest) String() string
type ComponentRouteResponse ¶
type ComponentRouteResponse struct {
// contains filtered or unexported fields
}
ComponentRouteResponse is the response returned by ComponentRouter Route rpc.
func (*ComponentRouteResponse) Descriptor
deprecated
func (*ComponentRouteResponse) Descriptor() ([]byte, []int)
Deprecated: Use ComponentRouteResponse.ProtoReflect.Descriptor instead.
func (*ComponentRouteResponse) ProtoMessage ¶
func (*ComponentRouteResponse) ProtoMessage()
func (*ComponentRouteResponse) ProtoReflect ¶
func (x *ComponentRouteResponse) ProtoReflect() protoreflect.Message
func (*ComponentRouteResponse) Reset ¶
func (x *ComponentRouteResponse) Reset()
func (*ComponentRouteResponse) String ¶
func (x *ComponentRouteResponse) String() string
type ComponentRouterClient ¶
type ComponentRouterClient interface { // Route method routes a stanza to a local registered component. Route(ctx context.Context, in *ComponentRouteRequest, opts ...grpc.CallOption) (*ComponentRouteResponse, error) }
ComponentRouterClient is the client API for ComponentRouter service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewComponentRouterClient ¶
func NewComponentRouterClient(cc *grpc.ClientConn) ComponentRouterClient
type ComponentRouterServer ¶
type ComponentRouterServer interface { // Route method routes a stanza to a local registered component. Route(context.Context, *ComponentRouteRequest) (*ComponentRouteResponse, error) }
ComponentRouterServer is the server API for ComponentRouter service.
type LocalDisconnectRequest ¶
type LocalDisconnectRequest struct { // username is the JID node value for the session we wish to disconnect. Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` // resource is the JID resourcepart value for the session we wish to disconnect. Resource string `protobuf:"bytes,2,opt,name=resource,proto3" json:"resource,omitempty"` // StreamError is disconnection stream error. StreamError *StreamError `protobuf:"bytes,3,opt,name=stream_error,json=streamError,proto3" json:"stream_error,omitempty"` // contains filtered or unexported fields }
LocalDisconnectRequest is the parameter message for LocalRouter Disconnect rpc.
func (*LocalDisconnectRequest) Descriptor
deprecated
func (*LocalDisconnectRequest) Descriptor() ([]byte, []int)
Deprecated: Use LocalDisconnectRequest.ProtoReflect.Descriptor instead.
func (*LocalDisconnectRequest) GetResource ¶
func (x *LocalDisconnectRequest) GetResource() string
func (*LocalDisconnectRequest) GetStreamError ¶
func (x *LocalDisconnectRequest) GetStreamError() *StreamError
func (*LocalDisconnectRequest) GetUsername ¶
func (x *LocalDisconnectRequest) GetUsername() string
func (*LocalDisconnectRequest) ProtoMessage ¶
func (*LocalDisconnectRequest) ProtoMessage()
func (*LocalDisconnectRequest) ProtoReflect ¶
func (x *LocalDisconnectRequest) ProtoReflect() protoreflect.Message
func (*LocalDisconnectRequest) Reset ¶
func (x *LocalDisconnectRequest) Reset()
func (*LocalDisconnectRequest) String ¶
func (x *LocalDisconnectRequest) String() string
type LocalDisconnectResponse ¶
type LocalDisconnectResponse struct {
// contains filtered or unexported fields
}
LocalDisconnectResponse is the response returned by LocalRouter Disconnect rpc.
func (*LocalDisconnectResponse) Descriptor
deprecated
func (*LocalDisconnectResponse) Descriptor() ([]byte, []int)
Deprecated: Use LocalDisconnectResponse.ProtoReflect.Descriptor instead.
func (*LocalDisconnectResponse) ProtoMessage ¶
func (*LocalDisconnectResponse) ProtoMessage()
func (*LocalDisconnectResponse) ProtoReflect ¶
func (x *LocalDisconnectResponse) ProtoReflect() protoreflect.Message
func (*LocalDisconnectResponse) Reset ¶
func (x *LocalDisconnectResponse) Reset()
func (*LocalDisconnectResponse) String ¶
func (x *LocalDisconnectResponse) String() string
type LocalRouteRequest ¶
type LocalRouteRequest struct { // username name of the user to which the stanza is routed to. Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` // resource is the registered resource to which the stanza is routed to. Resource string `protobuf:"bytes,2,opt,name=resource,proto3" json:"resource,omitempty"` // stanza contains the routed XMPP stanza. Stanza *stravaganza.PBElement `protobuf:"bytes,3,opt,name=stanza,proto3" json:"stanza,omitempty"` // contains filtered or unexported fields }
LocalRouteRequest is the parameter message for LocalRouter Route rpc.
func (*LocalRouteRequest) Descriptor
deprecated
func (*LocalRouteRequest) Descriptor() ([]byte, []int)
Deprecated: Use LocalRouteRequest.ProtoReflect.Descriptor instead.
func (*LocalRouteRequest) GetResource ¶
func (x *LocalRouteRequest) GetResource() string
func (*LocalRouteRequest) GetStanza ¶
func (x *LocalRouteRequest) GetStanza() *stravaganza.PBElement
func (*LocalRouteRequest) GetUsername ¶
func (x *LocalRouteRequest) GetUsername() string
func (*LocalRouteRequest) ProtoMessage ¶
func (*LocalRouteRequest) ProtoMessage()
func (*LocalRouteRequest) ProtoReflect ¶
func (x *LocalRouteRequest) ProtoReflect() protoreflect.Message
func (*LocalRouteRequest) Reset ¶
func (x *LocalRouteRequest) Reset()
func (*LocalRouteRequest) String ¶
func (x *LocalRouteRequest) String() string
type LocalRouteResponse ¶
type LocalRouteResponse struct {
// contains filtered or unexported fields
}
LocalRouteResponse is the response returned by LocalRouter Route rpc.
func (*LocalRouteResponse) Descriptor
deprecated
func (*LocalRouteResponse) Descriptor() ([]byte, []int)
Deprecated: Use LocalRouteResponse.ProtoReflect.Descriptor instead.
func (*LocalRouteResponse) ProtoMessage ¶
func (*LocalRouteResponse) ProtoMessage()
func (*LocalRouteResponse) ProtoReflect ¶
func (x *LocalRouteResponse) ProtoReflect() protoreflect.Message
func (*LocalRouteResponse) Reset ¶
func (x *LocalRouteResponse) Reset()
func (*LocalRouteResponse) String ¶
func (x *LocalRouteResponse) String() string
type LocalRouterClient ¶
type LocalRouterClient interface { // Route method routes a stanza to a local available resource. Route(ctx context.Context, in *LocalRouteRequest, opts ...grpc.CallOption) (*LocalRouteResponse, error) // Disconnect performs disconnection over a local available resource. Disconnect(ctx context.Context, in *LocalDisconnectRequest, opts ...grpc.CallOption) (*LocalDisconnectResponse, error) }
LocalRouterClient is the client API for LocalRouter service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewLocalRouterClient ¶
func NewLocalRouterClient(cc *grpc.ClientConn) LocalRouterClient
type LocalRouterServer ¶
type LocalRouterServer interface { // Route method routes a stanza to a local available resource. Route(context.Context, *LocalRouteRequest) (*LocalRouteResponse, error) // Disconnect performs disconnection over a local available resource. Disconnect(context.Context, *LocalDisconnectRequest) (*LocalDisconnectResponse, error) }
LocalRouterServer is the server API for LocalRouter service.
type StreamError ¶
type StreamError struct { Reason StreamErrorReason `protobuf:"varint,1,opt,name=reason,proto3,enum=cluster.v1.StreamErrorReason" json:"reason,omitempty"` Lang string `protobuf:"bytes,2,opt,name=lang,proto3" json:"lang,omitempty"` Text string `protobuf:"bytes,3,opt,name=text,proto3" json:"text,omitempty"` ApplicationElement *stravaganza.PBElement `protobuf:"bytes,4,opt,name=applicationElement,proto3" json:"applicationElement,omitempty"` // contains filtered or unexported fields }
StreamError represents a stream disconnection error reason.
func (*StreamError) Descriptor
deprecated
func (*StreamError) Descriptor() ([]byte, []int)
Deprecated: Use StreamError.ProtoReflect.Descriptor instead.
func (*StreamError) GetApplicationElement ¶
func (x *StreamError) GetApplicationElement() *stravaganza.PBElement
func (*StreamError) GetLang ¶
func (x *StreamError) GetLang() string
func (*StreamError) GetReason ¶
func (x *StreamError) GetReason() StreamErrorReason
func (*StreamError) GetText ¶
func (x *StreamError) GetText() string
func (*StreamError) ProtoMessage ¶
func (*StreamError) ProtoMessage()
func (*StreamError) ProtoReflect ¶
func (x *StreamError) ProtoReflect() protoreflect.Message
func (*StreamError) Reset ¶
func (x *StreamError) Reset()
func (*StreamError) String ¶
func (x *StreamError) String() string
type StreamErrorReason ¶
type StreamErrorReason int32
StreamErrorReason is an enumerated type that describes stream error reason.
const ( StreamErrorReason_STREAM_ERROR_REASON_INVALID_XML StreamErrorReason = 0 // Invalid XML. StreamErrorReason_STREAM_ERROR_REASON_INVALID_NAMESPACE StreamErrorReason = 1 // Invalid namespace. StreamErrorReason_STREAM_ERROR_REASON_HOST_UNKNOWN StreamErrorReason = 2 // Host unknown. StreamErrorReason_STREAM_ERROR_REASON_CONFLICT StreamErrorReason = 3 // Conflict. StreamErrorReason_STREAM_ERROR_REASON_INVALID_FROM StreamErrorReason = 4 // Invalid from. StreamErrorReason_STREAM_ERROR_REASON_POLICY_VIOLATION StreamErrorReason = 5 // Policy violation. StreamErrorReason_STREAM_ERROR_REASON_REMOTE_CONNECTION_FAILED StreamErrorReason = 6 // Remote connection failed. StreamErrorReason_STREAM_ERROR_REASON_CONNECTION_TIMEOUT StreamErrorReason = 7 // Connection timeout. StreamErrorReason_STREAM_ERROR_REASON_UNSUPPORTED_STANZA_TYPE StreamErrorReason = 8 // Unsupported stanza type. StreamErrorReason_STREAM_ERROR_REASON_UNSUPPORTED_VERSION StreamErrorReason = 9 // Unsupported version. StreamErrorReason_STREAM_ERROR_REASON_NOT_AUTHORIZED StreamErrorReason = 10 // Not authorized. StreamErrorReason_STREAM_ERROR_REASON_RESOURCE_CONSTRAINT StreamErrorReason = 11 // Resource constraint. StreamErrorReason_STREAM_ERROR_REASON_SYSTEM_SHUTDOWN StreamErrorReason = 12 // System shutdown. StreamErrorReason_STREAM_ERROR_REASON_UNDEFINED_CONDITION StreamErrorReason = 13 // Undefined condition. StreamErrorReason_STREAM_ERROR_REASON_INTERNAL_SERVER_ERROR StreamErrorReason = 14 // Server error. )
func (StreamErrorReason) Descriptor ¶
func (StreamErrorReason) Descriptor() protoreflect.EnumDescriptor
func (StreamErrorReason) Enum ¶
func (x StreamErrorReason) Enum() *StreamErrorReason
func (StreamErrorReason) EnumDescriptor
deprecated
func (StreamErrorReason) EnumDescriptor() ([]byte, []int)
Deprecated: Use StreamErrorReason.Descriptor instead.
func (StreamErrorReason) Number ¶
func (x StreamErrorReason) Number() protoreflect.EnumNumber
func (StreamErrorReason) String ¶
func (x StreamErrorReason) String() string
func (StreamErrorReason) Type ¶
func (StreamErrorReason) Type() protoreflect.EnumType
type UnimplementedComponentRouterServer ¶
type UnimplementedComponentRouterServer struct { }
UnimplementedComponentRouterServer can be embedded to have forward compatible implementations.
func (*UnimplementedComponentRouterServer) Route ¶
func (*UnimplementedComponentRouterServer) Route(context.Context, *ComponentRouteRequest) (*ComponentRouteResponse, error)
type UnimplementedLocalRouterServer ¶
type UnimplementedLocalRouterServer struct { }
UnimplementedLocalRouterServer can be embedded to have forward compatible implementations.
func (*UnimplementedLocalRouterServer) Disconnect ¶
func (*UnimplementedLocalRouterServer) Disconnect(context.Context, *LocalDisconnectRequest) (*LocalDisconnectResponse, error)
func (*UnimplementedLocalRouterServer) Route ¶
func (*UnimplementedLocalRouterServer) Route(context.Context, *LocalRouteRequest) (*LocalRouteResponse, error)