pb

package
v0.0.0-...-4f2055d Latest Latest
Warning

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

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

Documentation

Index

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

func (*UnimplementedNotifyServer) OnClientConnect

func (*UnimplementedNotifyServer) OnClientDisconnected

func (*UnimplementedNotifyServer) OnSubscribe

func (*UnimplementedNotifyServer) OnUnSubscribe

Jump to

Keyboard shortcuts

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