Documentation ¶
Index ¶
- Variables
- func RegisterNotifyServer(s *grpc.Server, srv NotifyServer)
- type NotifyClient
- type NotifyRequest
- type NotifyResponse
- type NotifyServer
- type UnimplementedNotifyServer
- func (*UnimplementedNotifyServer) OnAgentConnect(context.Context, *NotifyRequest) (*NotifyResponse, error)
- func (*UnimplementedNotifyServer) OnAgentDisconnected(context.Context, *NotifyRequest) (*NotifyResponse, error)
- func (*UnimplementedNotifyServer) OnClientConnect(context.Context, *NotifyRequest) (*NotifyResponse, error)
- func (*UnimplementedNotifyServer) OnClientDisconnected(context.Context, *NotifyRequest) (*NotifyResponse, error)
- func (*UnimplementedNotifyServer) OnSubscribe(context.Context, *NotifyRequest) (*NotifyResponse, error)
- func (*UnimplementedNotifyServer) OnUnSubscribe(context.Context, *NotifyRequest) (*NotifyResponse, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var File_notify_proto protoreflect.FileDescriptor
Functions ¶
func RegisterNotifyServer ¶
func RegisterNotifyServer(s *grpc.Server, srv NotifyServer)
Types ¶
type NotifyClient ¶
type NotifyClient interface { // 定义方法 OnClientConnect(ctx context.Context, in *NotifyRequest, opts ...grpc.CallOption) (*NotifyResponse, error) OnClientDisconnected(ctx context.Context, in *NotifyRequest, opts ...grpc.CallOption) (*NotifyResponse, error) OnSubscribe(ctx context.Context, in *NotifyRequest, opts ...grpc.CallOption) (*NotifyResponse, error) OnUnSubscribe(ctx context.Context, in *NotifyRequest, opts ...grpc.CallOption) (*NotifyResponse, error) OnAgentConnect(ctx context.Context, in *NotifyRequest, opts ...grpc.CallOption) (*NotifyResponse, error) OnAgentDisconnected(ctx context.Context, in *NotifyRequest, opts ...grpc.CallOption) (*NotifyResponse, error) }
NotifyClient is the client API for Notify service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewNotifyClient ¶
func NewNotifyClient(cc grpc.ClientConnInterface) NotifyClient
type NotifyRequest ¶
type NotifyRequest struct { Data *anypb.Any `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` // 1代表顺序 // contains filtered or unexported fields }
定义request
func (*NotifyRequest) Descriptor
deprecated
func (*NotifyRequest) Descriptor() ([]byte, []int)
Deprecated: Use NotifyRequest.ProtoReflect.Descriptor instead.
func (*NotifyRequest) GetData ¶
func (x *NotifyRequest) GetData() *anypb.Any
func (*NotifyRequest) ProtoMessage ¶
func (*NotifyRequest) ProtoMessage()
func (*NotifyRequest) ProtoReflect ¶
func (x *NotifyRequest) ProtoReflect() protoreflect.Message
func (*NotifyRequest) Reset ¶
func (x *NotifyRequest) Reset()
func (*NotifyRequest) String ¶
func (x *NotifyRequest) String() string
type NotifyResponse ¶
type NotifyResponse struct { Status bool `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"` // 1代表顺序 // contains filtered or unexported fields }
定义response
func (*NotifyResponse) Descriptor
deprecated
func (*NotifyResponse) Descriptor() ([]byte, []int)
Deprecated: Use NotifyResponse.ProtoReflect.Descriptor instead.
func (*NotifyResponse) GetStatus ¶
func (x *NotifyResponse) GetStatus() bool
func (*NotifyResponse) ProtoMessage ¶
func (*NotifyResponse) ProtoMessage()
func (*NotifyResponse) ProtoReflect ¶
func (x *NotifyResponse) ProtoReflect() protoreflect.Message
func (*NotifyResponse) Reset ¶
func (x *NotifyResponse) Reset()
func (*NotifyResponse) String ¶
func (x *NotifyResponse) String() string
type NotifyServer ¶
type NotifyServer interface { // 定义方法 OnClientConnect(context.Context, *NotifyRequest) (*NotifyResponse, error) OnClientDisconnected(context.Context, *NotifyRequest) (*NotifyResponse, error) OnSubscribe(context.Context, *NotifyRequest) (*NotifyResponse, error) OnUnSubscribe(context.Context, *NotifyRequest) (*NotifyResponse, error) OnAgentConnect(context.Context, *NotifyRequest) (*NotifyResponse, error) OnAgentDisconnected(context.Context, *NotifyRequest) (*NotifyResponse, error) }
NotifyServer is the server API for Notify service.
type UnimplementedNotifyServer ¶
type UnimplementedNotifyServer struct { }
UnimplementedNotifyServer can be embedded to have forward compatible implementations.
func (*UnimplementedNotifyServer) OnAgentConnect ¶
func (*UnimplementedNotifyServer) OnAgentConnect(context.Context, *NotifyRequest) (*NotifyResponse, error)
func (*UnimplementedNotifyServer) OnAgentDisconnected ¶
func (*UnimplementedNotifyServer) OnAgentDisconnected(context.Context, *NotifyRequest) (*NotifyResponse, error)
func (*UnimplementedNotifyServer) OnClientConnect ¶
func (*UnimplementedNotifyServer) OnClientConnect(context.Context, *NotifyRequest) (*NotifyResponse, error)
func (*UnimplementedNotifyServer) OnClientDisconnected ¶
func (*UnimplementedNotifyServer) OnClientDisconnected(context.Context, *NotifyRequest) (*NotifyResponse, error)
func (*UnimplementedNotifyServer) OnSubscribe ¶
func (*UnimplementedNotifyServer) OnSubscribe(context.Context, *NotifyRequest) (*NotifyResponse, error)
func (*UnimplementedNotifyServer) OnUnSubscribe ¶
func (*UnimplementedNotifyServer) OnUnSubscribe(context.Context, *NotifyRequest) (*NotifyResponse, error)
Click to show internal directories.
Click to hide internal directories.