nh

package
v0.0.0-...-8b6e091 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: BSD-3-Clause Imports: 13 Imported by: 5

Documentation

Index

Constants

View Source
const (
	// NodeServiceCode 节点管理服务,每个内部节点都会内置这个grpc服务
	NodeServiceCode int32 = -1
	// GatewayServiceCode 网关服务代码,每个网关节点都会内置这个grpc服务
	GatewayServiceCode int32 = -2
)
View Source
const (
	Gateway_IsSessionExist_FullMethodName     = "/nodehub.Gateway/IsSessionExist"
	Gateway_SessionCount_FullMethodName       = "/nodehub.Gateway/SessionCount"
	Gateway_CloseSession_FullMethodName       = "/nodehub.Gateway/CloseSession"
	Gateway_SetServiceRoute_FullMethodName    = "/nodehub.Gateway/SetServiceRoute"
	Gateway_RemoveServiceRoute_FullMethodName = "/nodehub.Gateway/RemoveServiceRoute"
	Gateway_PushMessage_FullMethodName        = "/nodehub.Gateway/PushMessage"
)
View Source
const (
	Node_ChangeState_FullMethodName = "/nodehub.Node/ChangeState"
	Node_Shutdown_FullMethodName    = "/nodehub.Node/Shutdown"
)

Variables

View Source
var (
	Protocol_name = map[int32]string{
		0: "UNSPECIFIED",
		1: "RPC_ERROR",
	}
	Protocol_value = map[string]int32{
		"UNSPECIFIED": 0,
		"RPC_ERROR":   1,
	}
)

Enum value maps for Protocol.

View Source
var File_nodehub_client_proto protoreflect.FileDescriptor
View Source
var File_nodehub_gateway_proto protoreflect.FileDescriptor
View Source
var File_nodehub_gateway_service_proto protoreflect.FileDescriptor
View Source
var File_nodehub_node_service_proto protoreflect.FileDescriptor
View Source
var Gateway_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "nodehub.Gateway",
	HandlerType: (*GatewayServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "IsSessionExist",
			Handler:    _Gateway_IsSessionExist_Handler,
		},
		{
			MethodName: "SessionCount",
			Handler:    _Gateway_SessionCount_Handler,
		},
		{
			MethodName: "CloseSession",
			Handler:    _Gateway_CloseSession_Handler,
		},
		{
			MethodName: "SetServiceRoute",
			Handler:    _Gateway_SetServiceRoute_Handler,
		},
		{
			MethodName: "RemoveServiceRoute",
			Handler:    _Gateway_RemoveServiceRoute_Handler,
		},
		{
			MethodName: "PushMessage",
			Handler:    _Gateway_PushMessage_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "nodehub/gateway_service.proto",
}

Gateway_ServiceDesc is the grpc.ServiceDesc for Gateway 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 Node_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "nodehub.Node",
	HandlerType: (*NodeServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ChangeState",
			Handler:    _Node_ChangeState_Handler,
		},
		{
			MethodName: "Shutdown",
			Handler:    _Node_Shutdown_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "nodehub/node_service.proto",
}

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

Functions

func RegisterGatewayServer

func RegisterGatewayServer(s grpc.ServiceRegistrar, srv GatewayServer)

func RegisterNodeServer

func RegisterNodeServer(s grpc.ServiceRegistrar, srv NodeServer)

func ResetReply

func ResetReply(resp *Reply)

ResetReply 重置响应对象

func ResetRequest

func ResetRequest(req *Request)

ResetRequest 重置请求对象

Types

type ChangeStateRequest

type ChangeStateRequest struct {
	State string `protobuf:"bytes,1,opt,name=state,proto3" json:"state,omitempty"`
	// contains filtered or unexported fields
}

func (*ChangeStateRequest) Descriptor deprecated

func (*ChangeStateRequest) Descriptor() ([]byte, []int)

Deprecated: Use ChangeStateRequest.ProtoReflect.Descriptor instead.

func (*ChangeStateRequest) GetState

func (x *ChangeStateRequest) GetState() string

func (*ChangeStateRequest) ProtoMessage

func (*ChangeStateRequest) ProtoMessage()

func (*ChangeStateRequest) ProtoReflect

func (x *ChangeStateRequest) ProtoReflect() protoreflect.Message

func (*ChangeStateRequest) Reset

func (x *ChangeStateRequest) Reset()

func (*ChangeStateRequest) String

func (x *ChangeStateRequest) String() string

type CloseSessionRequest

type CloseSessionRequest struct {
	SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
	// contains filtered or unexported fields
}

func (*CloseSessionRequest) Descriptor deprecated

func (*CloseSessionRequest) Descriptor() ([]byte, []int)

Deprecated: Use CloseSessionRequest.ProtoReflect.Descriptor instead.

func (*CloseSessionRequest) GetSessionId

func (x *CloseSessionRequest) GetSessionId() string

func (*CloseSessionRequest) ProtoMessage

func (*CloseSessionRequest) ProtoMessage()

func (*CloseSessionRequest) ProtoReflect

func (x *CloseSessionRequest) ProtoReflect() protoreflect.Message

func (*CloseSessionRequest) Reset

func (x *CloseSessionRequest) Reset()

func (*CloseSessionRequest) String

func (x *CloseSessionRequest) String() string

type CloseSessionResponse

type CloseSessionResponse struct {
	SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
	// success 为 false 时,表示会话不存在
	Success bool `protobuf:"varint,2,opt,name=success,proto3" json:"success,omitempty"`
	// contains filtered or unexported fields
}

func (*CloseSessionResponse) Descriptor deprecated

func (*CloseSessionResponse) Descriptor() ([]byte, []int)

Deprecated: Use CloseSessionResponse.ProtoReflect.Descriptor instead.

func (*CloseSessionResponse) GetSessionId

func (x *CloseSessionResponse) GetSessionId() string

func (*CloseSessionResponse) GetSuccess

func (x *CloseSessionResponse) GetSuccess() bool

func (*CloseSessionResponse) ProtoMessage

func (*CloseSessionResponse) ProtoMessage()

func (*CloseSessionResponse) ProtoReflect

func (x *CloseSessionResponse) ProtoReflect() protoreflect.Message

func (*CloseSessionResponse) Reset

func (x *CloseSessionResponse) Reset()

func (*CloseSessionResponse) String

func (x *CloseSessionResponse) String() string

type GatewayClient

type GatewayClient interface {
	// 会话是否存在
	IsSessionExist(ctx context.Context, in *IsSessionExistRequest, opts ...grpc.CallOption) (*IsSessionExistResponse, error)
	// 会话数量
	SessionCount(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*SessionCountResponse, error)
	// 关闭会话连接,踢下线
	CloseSession(ctx context.Context, in *CloseSessionRequest, opts ...grpc.CallOption) (*CloseSessionResponse, error)
	// 修改状态服务路由
	SetServiceRoute(ctx context.Context, in *SetServiceRouteRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// 删除状态服务路由
	RemoveServiceRoute(ctx context.Context, in *RemoveServiceRouteRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// 向指定会话推送消息
	PushMessage(ctx context.Context, in *PushMessageRequest, opts ...grpc.CallOption) (*PushMessageResponse, error)
}

GatewayClient is the client API for Gateway 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.

func NewGatewayClient

func NewGatewayClient(cc grpc.ClientConnInterface) GatewayClient

type GatewayServer

type GatewayServer interface {
	// 会话是否存在
	IsSessionExist(context.Context, *IsSessionExistRequest) (*IsSessionExistResponse, error)
	// 会话数量
	SessionCount(context.Context, *emptypb.Empty) (*SessionCountResponse, error)
	// 关闭会话连接,踢下线
	CloseSession(context.Context, *CloseSessionRequest) (*CloseSessionResponse, error)
	// 修改状态服务路由
	SetServiceRoute(context.Context, *SetServiceRouteRequest) (*emptypb.Empty, error)
	// 删除状态服务路由
	RemoveServiceRoute(context.Context, *RemoveServiceRouteRequest) (*emptypb.Empty, error)
	// 向指定会话推送消息
	PushMessage(context.Context, *PushMessageRequest) (*PushMessageResponse, error)
	// contains filtered or unexported methods
}

GatewayServer is the server API for Gateway service. All implementations must embed UnimplementedGatewayServer for forward compatibility

type IsSessionExistRequest

type IsSessionExistRequest struct {
	SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
	// contains filtered or unexported fields
}

func (*IsSessionExistRequest) Descriptor deprecated

func (*IsSessionExistRequest) Descriptor() ([]byte, []int)

Deprecated: Use IsSessionExistRequest.ProtoReflect.Descriptor instead.

func (*IsSessionExistRequest) GetSessionId

func (x *IsSessionExistRequest) GetSessionId() string

func (*IsSessionExistRequest) ProtoMessage

func (*IsSessionExistRequest) ProtoMessage()

func (*IsSessionExistRequest) ProtoReflect

func (x *IsSessionExistRequest) ProtoReflect() protoreflect.Message

func (*IsSessionExistRequest) Reset

func (x *IsSessionExistRequest) Reset()

func (*IsSessionExistRequest) String

func (x *IsSessionExistRequest) String() string

type IsSessionExistResponse

type IsSessionExistResponse struct {
	SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
	Exist     bool   `protobuf:"varint,2,opt,name=exist,proto3" json:"exist,omitempty"`
	// contains filtered or unexported fields
}

func (*IsSessionExistResponse) Descriptor deprecated

func (*IsSessionExistResponse) Descriptor() ([]byte, []int)

Deprecated: Use IsSessionExistResponse.ProtoReflect.Descriptor instead.

func (*IsSessionExistResponse) GetExist

func (x *IsSessionExistResponse) GetExist() bool

func (*IsSessionExistResponse) GetSessionId

func (x *IsSessionExistResponse) GetSessionId() string

func (*IsSessionExistResponse) ProtoMessage

func (*IsSessionExistResponse) ProtoMessage()

func (*IsSessionExistResponse) ProtoReflect

func (x *IsSessionExistResponse) ProtoReflect() protoreflect.Message

func (*IsSessionExistResponse) Reset

func (x *IsSessionExistResponse) Reset()

func (*IsSessionExistResponse) String

func (x *IsSessionExistResponse) String() string

type Multicast

type Multicast struct {

	// 消息接收者,网关节点根据user_id找到对应的客户端连接
	Receiver []string `protobuf:"bytes,1,rep,name=receiver,proto3" json:"receiver,omitempty"`
	// 消息发布时间
	Time *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=time,proto3" json:"time,omitempty"`
	// 消息内容
	Content *Reply `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"`
	// contains filtered or unexported fields
}

用于内部节点主动向客户端发送消息 内部节点把消息打包为Multicast,然后push到消息队列 网关节点从消息队列中获取Multicast,然后push到客户端

func NewMulticast

func NewMulticast(receiver []string, content *Reply) *Multicast

NewMulticast 创建push消息

func (*Multicast) Descriptor deprecated

func (*Multicast) Descriptor() ([]byte, []int)

Deprecated: Use Multicast.ProtoReflect.Descriptor instead.

func (*Multicast) GetContent

func (x *Multicast) GetContent() *Reply

func (*Multicast) GetReceiver

func (x *Multicast) GetReceiver() []string

func (*Multicast) GetTime

func (x *Multicast) GetTime() *timestamppb.Timestamp

func (*Multicast) ProtoMessage

func (*Multicast) ProtoMessage()

func (*Multicast) ProtoReflect

func (x *Multicast) ProtoReflect() protoreflect.Message

func (*Multicast) Reset

func (x *Multicast) Reset()

func (*Multicast) String

func (x *Multicast) String() string

type NodeClient

type NodeClient interface {
	// 改变节点状态
	ChangeState(ctx context.Context, in *ChangeStateRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// 关闭服务
	Shutdown(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

NodeClient is the client API for Node 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.

func NewNodeClient

func NewNodeClient(cc grpc.ClientConnInterface) NodeClient

type NodeServer

type NodeServer interface {
	// 改变节点状态
	ChangeState(context.Context, *ChangeStateRequest) (*emptypb.Empty, error)
	// 关闭服务
	Shutdown(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
	// contains filtered or unexported methods
}

NodeServer is the server API for Node service. All implementations must embed UnimplementedNodeServer for forward compatibility

type Protocol

type Protocol int32
const (
	Protocol_UNSPECIFIED Protocol = 0
	Protocol_RPC_ERROR   Protocol = 1
)

func (Protocol) Descriptor

func (Protocol) Descriptor() protoreflect.EnumDescriptor

func (Protocol) Enum

func (x Protocol) Enum() *Protocol

func (Protocol) EnumDescriptor deprecated

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

Deprecated: Use Protocol.Descriptor instead.

func (Protocol) Number

func (x Protocol) Number() protoreflect.EnumNumber

func (Protocol) String

func (x Protocol) String() string

func (Protocol) Type

type PushMessageRequest

type PushMessageRequest struct {
	SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
	Reply     *Reply `protobuf:"bytes,2,opt,name=reply,proto3" json:"reply,omitempty"`
	// contains filtered or unexported fields
}

func (*PushMessageRequest) Descriptor deprecated

func (*PushMessageRequest) Descriptor() ([]byte, []int)

Deprecated: Use PushMessageRequest.ProtoReflect.Descriptor instead.

func (*PushMessageRequest) GetReply

func (x *PushMessageRequest) GetReply() *Reply

func (*PushMessageRequest) GetSessionId

func (x *PushMessageRequest) GetSessionId() string

func (*PushMessageRequest) ProtoMessage

func (*PushMessageRequest) ProtoMessage()

func (*PushMessageRequest) ProtoReflect

func (x *PushMessageRequest) ProtoReflect() protoreflect.Message

func (*PushMessageRequest) Reset

func (x *PushMessageRequest) Reset()

func (*PushMessageRequest) String

func (x *PushMessageRequest) String() string

type PushMessageResponse

type PushMessageResponse struct {
	SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
	// success 为 false 时,表示会话不存在
	Success bool `protobuf:"varint,2,opt,name=success,proto3" json:"success,omitempty"`
	// contains filtered or unexported fields
}

func (*PushMessageResponse) Descriptor deprecated

func (*PushMessageResponse) Descriptor() ([]byte, []int)

Deprecated: Use PushMessageResponse.ProtoReflect.Descriptor instead.

func (*PushMessageResponse) GetSessionId

func (x *PushMessageResponse) GetSessionId() string

func (*PushMessageResponse) GetSuccess

func (x *PushMessageResponse) GetSuccess() bool

func (*PushMessageResponse) ProtoMessage

func (*PushMessageResponse) ProtoMessage()

func (*PushMessageResponse) ProtoReflect

func (x *PushMessageResponse) ProtoReflect() protoreflect.Message

func (*PushMessageResponse) Reset

func (x *PushMessageResponse) Reset()

func (*PushMessageResponse) String

func (x *PushMessageResponse) String() string

type RPCError

type RPCError struct {

	// request消息请求的服务
	RequestService int32 `protobuf:"varint,1,opt,name=request_service,json=requestService,proto3" json:"request_service,omitempty"`
	// request消息请求的方法
	RequestMethod string `protobuf:"bytes,2,opt,name=request_method,json=requestMethod,proto3" json:"request_method,omitempty"`
	// 详细错误信息
	Status *status.Status `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"`
	// contains filtered or unexported fields
}

网关透传grpc请求后,返回的grpc错误

func (*RPCError) Descriptor deprecated

func (*RPCError) Descriptor() ([]byte, []int)

Deprecated: Use RPCError.ProtoReflect.Descriptor instead.

func (*RPCError) GetRequestMethod

func (x *RPCError) GetRequestMethod() string

func (*RPCError) GetRequestService

func (x *RPCError) GetRequestService() int32

func (*RPCError) GetStatus

func (x *RPCError) GetStatus() *status.Status

func (*RPCError) ProtoMessage

func (*RPCError) ProtoMessage()

func (*RPCError) ProtoReflect

func (x *RPCError) ProtoReflect() protoreflect.Message

func (*RPCError) Reset

func (x *RPCError) Reset()

func (*RPCError) String

func (x *RPCError) String() string

type RemoveServiceRouteRequest

type RemoveServiceRouteRequest struct {
	ServiceCode int32  `protobuf:"varint,1,opt,name=service_code,json=serviceCode,proto3" json:"service_code,omitempty"`
	SessionId   string `protobuf:"bytes,2,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
	// contains filtered or unexported fields
}

func (*RemoveServiceRouteRequest) Descriptor deprecated

func (*RemoveServiceRouteRequest) Descriptor() ([]byte, []int)

Deprecated: Use RemoveServiceRouteRequest.ProtoReflect.Descriptor instead.

func (*RemoveServiceRouteRequest) GetServiceCode

func (x *RemoveServiceRouteRequest) GetServiceCode() int32

func (*RemoveServiceRouteRequest) GetSessionId

func (x *RemoveServiceRouteRequest) GetSessionId() string

func (*RemoveServiceRouteRequest) ProtoMessage

func (*RemoveServiceRouteRequest) ProtoMessage()

func (*RemoveServiceRouteRequest) ProtoReflect

func (*RemoveServiceRouteRequest) Reset

func (x *RemoveServiceRouteRequest) Reset()

func (*RemoveServiceRouteRequest) String

func (x *RemoveServiceRouteRequest) String() string

type Reply

type Reply struct {

	// 触发此次请求的request_id
	// 网关会自动给这个字段赋值
	// 如果是服务器端主动下发,request_id = 0
	RequestId uint32 `protobuf:"varint,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
	// 服务ID,对应内部节点的每种grpc服务
	// 标识这个消息来自于哪个内部服务
	// grpc调用返回结果,网关会自动给这个字段赋值
	// 如果是服务器端主动下发,需要自行赋值
	// from_service = 0,表示这个消息来自于网关本身
	FromService int32 `protobuf:"varint,2,opt,name=from_service,json=fromService,proto3" json:"from_service,omitempty"`
	// 消息类型ID,可以是集群范围唯一,也可以是服务范围唯一
	// 需要下发时自行指定
	// message_type = 0,表示这是google.protobuf.Empty类型的空消息
	MessageType int32 `protobuf:"varint,3,opt,name=message_type,json=messageType,proto3" json:"message_type,omitempty"`
	// 下行protobuf message序列化之后的数据
	// 客户端需要根据message_type字段判断具体反序列化成哪个protobuf message
	Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

来自服务器端下行的消息

func NewReply

func NewReply(msgType int32, msg proto.Message) (*Reply, error)

NewReply 把proto message打包Reply

func (*Reply) Descriptor deprecated

func (*Reply) Descriptor() ([]byte, []int)

Deprecated: Use Reply.ProtoReflect.Descriptor instead.

func (*Reply) GetData

func (x *Reply) GetData() []byte

func (*Reply) GetFromService

func (x *Reply) GetFromService() int32

func (*Reply) GetMessageType

func (x *Reply) GetMessageType() int32

func (*Reply) GetRequestId

func (x *Reply) GetRequestId() uint32

func (*Reply) ProtoMessage

func (*Reply) ProtoMessage()

func (*Reply) ProtoReflect

func (x *Reply) ProtoReflect() protoreflect.Message

func (*Reply) Reset

func (x *Reply) Reset()

func (*Reply) String

func (x *Reply) String() string

type Request

type Request struct {

	// 由客户端生成,网关会在response内原样返回
	// id是会话级别唯一的
	Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// 节点ID
	// 如果有值,网关会把本次请求直接转发到指定的节点
	// 仅仅在有状态服务的allocation配置为client时有效
	NodeId string `protobuf:"bytes,2,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"`
	// 服务ID,对应内部节点的每种grpc服务
	// 内部节点在注册服务发现时,会将服务ID注册到etcd中
	// 网关根据service_code字段将请求转发到对应的内部服务
	ServiceCode int32 `protobuf:"varint,3,opt,name=service_code,json=serviceCode,proto3" json:"service_code,omitempty"`
	// grpc方法名,大小写敏感,例如: SayHello
	Method string `protobuf:"bytes,4,opt,name=method,proto3" json:"method,omitempty"`
	// grpc方法对应的protobuf message序列化之后的数据
	// 具体对应关系需要自行查看grpc服务的protobuf文件
	Data []byte `protobuf:"bytes,5,opt,name=data,proto3" json:"data,omitempty"`
	// 是否需要网关返回response
	NoReply bool `protobuf:"varint,6,opt,name=no_reply,json=noReply,proto3" json:"no_reply,omitempty"`
	// contains filtered or unexported fields
}

客户端上行消息 请求会被网关转换为grpc请求转发到内部服务

func (*Request) Descriptor deprecated

func (*Request) Descriptor() ([]byte, []int)

Deprecated: Use Request.ProtoReflect.Descriptor instead.

func (*Request) GetData

func (x *Request) GetData() []byte

func (*Request) GetId

func (x *Request) GetId() uint32

func (*Request) GetMethod

func (x *Request) GetMethod() string

func (*Request) GetNoReply

func (x *Request) GetNoReply() bool

func (*Request) GetNodeId

func (x *Request) GetNodeId() string

func (*Request) GetServiceCode

func (x *Request) GetServiceCode() int32

func (*Request) LogValue

func (x *Request) LogValue() slog.Value

LogValue implements slog.LogValuer

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) ProtoReflect

func (x *Request) ProtoReflect() protoreflect.Message

func (*Request) Reset

func (x *Request) Reset()

func (*Request) String

func (x *Request) String() string

type SessionCountResponse

type SessionCountResponse struct {
	Count int32 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"`
	// contains filtered or unexported fields
}

func (*SessionCountResponse) Descriptor deprecated

func (*SessionCountResponse) Descriptor() ([]byte, []int)

Deprecated: Use SessionCountResponse.ProtoReflect.Descriptor instead.

func (*SessionCountResponse) GetCount

func (x *SessionCountResponse) GetCount() int32

func (*SessionCountResponse) ProtoMessage

func (*SessionCountResponse) ProtoMessage()

func (*SessionCountResponse) ProtoReflect

func (x *SessionCountResponse) ProtoReflect() protoreflect.Message

func (*SessionCountResponse) Reset

func (x *SessionCountResponse) Reset()

func (*SessionCountResponse) String

func (x *SessionCountResponse) String() string

type SetServiceRouteRequest

type SetServiceRouteRequest struct {
	ServiceCode int32  `protobuf:"varint,1,opt,name=service_code,json=serviceCode,proto3" json:"service_code,omitempty"`
	SessionId   string `protobuf:"bytes,2,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
	NodeId      string `protobuf:"bytes,3,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"`
	// contains filtered or unexported fields
}

func (*SetServiceRouteRequest) Descriptor deprecated

func (*SetServiceRouteRequest) Descriptor() ([]byte, []int)

Deprecated: Use SetServiceRouteRequest.ProtoReflect.Descriptor instead.

func (*SetServiceRouteRequest) GetNodeId

func (x *SetServiceRouteRequest) GetNodeId() string

func (*SetServiceRouteRequest) GetServiceCode

func (x *SetServiceRouteRequest) GetServiceCode() int32

func (*SetServiceRouteRequest) GetSessionId

func (x *SetServiceRouteRequest) GetSessionId() string

func (*SetServiceRouteRequest) ProtoMessage

func (*SetServiceRouteRequest) ProtoMessage()

func (*SetServiceRouteRequest) ProtoReflect

func (x *SetServiceRouteRequest) ProtoReflect() protoreflect.Message

func (*SetServiceRouteRequest) Reset

func (x *SetServiceRouteRequest) Reset()

func (*SetServiceRouteRequest) String

func (x *SetServiceRouteRequest) String() string

type UnimplementedGatewayServer

type UnimplementedGatewayServer struct {
}

UnimplementedGatewayServer must be embedded to have forward compatible implementations.

func (UnimplementedGatewayServer) CloseSession

func (UnimplementedGatewayServer) IsSessionExist

func (UnimplementedGatewayServer) PushMessage

func (UnimplementedGatewayServer) RemoveServiceRoute

func (UnimplementedGatewayServer) SessionCount

func (UnimplementedGatewayServer) SetServiceRoute

type UnimplementedNodeServer

type UnimplementedNodeServer struct {
}

UnimplementedNodeServer must be embedded to have forward compatible implementations.

func (UnimplementedNodeServer) ChangeState

func (UnimplementedNodeServer) Shutdown

type UnsafeGatewayServer

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

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

type UnsafeNodeServer

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

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

Jump to

Keyboard shortcuts

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