pb

package
v0.57.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 12, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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.

View Source
var ComponentRouter_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "cluster.v1.ComponentRouter",
	HandlerType: (*ComponentRouterServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Route",
			Handler:    _ComponentRouter_Route_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "proto/cluster/v1/cluster.proto",
}

ComponentRouter_ServiceDesc is the grpc.ServiceDesc for ComponentRouter service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_proto_cluster_v1_cluster_proto protoreflect.FileDescriptor
View Source
var LocalRouter_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "cluster.v1.LocalRouter",
	HandlerType: (*LocalRouterServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Route",
			Handler:    _LocalRouter_Route_Handler,
		},
		{
			MethodName: "Disconnect",
			Handler:    _LocalRouter_Disconnect_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "proto/cluster/v1/cluster.proto",
}

LocalRouter_ServiceDesc is the grpc.ServiceDesc for LocalRouter service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterComponentRouterServer

func RegisterComponentRouterServer(s grpc.ServiceRegistrar, srv ComponentRouterServer)

func RegisterLocalRouterServer

func RegisterLocalRouterServer(s grpc.ServiceRegistrar, 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 (*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://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type ComponentRouterServer

type ComponentRouterServer interface {
	// Route method routes a stanza to a local registered component.
	Route(context.Context, *ComponentRouteRequest) (*ComponentRouteResponse, error)
	// contains filtered or unexported methods
}

ComponentRouterServer is the server API for ComponentRouter service. All implementations must embed UnimplementedComponentRouterServer for forward compatibility

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://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

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)
	// contains filtered or unexported methods
}

LocalRouterServer is the server API for LocalRouter service. All implementations must embed UnimplementedLocalRouterServer for forward compatibility

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) Enum

func (StreamErrorReason) EnumDescriptor deprecated

func (StreamErrorReason) EnumDescriptor() ([]byte, []int)

Deprecated: Use StreamErrorReason.Descriptor instead.

func (StreamErrorReason) Number

func (StreamErrorReason) String

func (x StreamErrorReason) String() string

func (StreamErrorReason) Type

type UnimplementedComponentRouterServer

type UnimplementedComponentRouterServer struct {
}

UnimplementedComponentRouterServer must be embedded to have forward compatible implementations.

func (UnimplementedComponentRouterServer) Route

type UnimplementedLocalRouterServer

type UnimplementedLocalRouterServer struct {
}

UnimplementedLocalRouterServer must be embedded to have forward compatible implementations.

func (UnimplementedLocalRouterServer) Disconnect

func (UnimplementedLocalRouterServer) Route

type UnsafeComponentRouterServer added in v0.56.0

type UnsafeComponentRouterServer interface {
	// contains filtered or unexported methods
}

UnsafeComponentRouterServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ComponentRouterServer will result in compilation errors.

type UnsafeLocalRouterServer added in v0.56.0

type UnsafeLocalRouterServer interface {
	// contains filtered or unexported methods
}

UnsafeLocalRouterServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to LocalRouterServer will result in compilation errors.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL