grpc

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

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

Go to latest
Published: Sep 26, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_grpc_notice_proto protoreflect.FileDescriptor

Functions

func RegisterNoticeServer

func RegisterNoticeServer(s *grpc.Server, srv NoticeServer)

func Service

func Service(Port string)

Types

type NoticeClient

type NoticeClient interface {
	Bind(ctx context.Context, in *Req, opts ...grpc.CallOption) (*Res, error)
	UnBind(ctx context.Context, in *Req, opts ...grpc.CallOption) (*Res, error)
	SendUid(ctx context.Context, in *Req, opts ...grpc.CallOption) (*Res, error)
}

NoticeClient is the client API for Notice service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewNoticeClient

func NewNoticeClient(cc grpc.ClientConnInterface) NoticeClient

type NoticeServer

type NoticeServer interface {
	Bind(context.Context, *Req) (*Res, error)
	UnBind(context.Context, *Req) (*Res, error)
	SendUid(context.Context, *Req) (*Res, error)
}

NoticeServer is the server API for Notice service.

type Req

type Req struct {
	Id  int64  `protobuf:"varint,1,opt,name=Id,proto3" json:"Id,omitempty"`
	Msg string `protobuf:"bytes,4,opt,name=Msg,proto3" json:"Msg,omitempty"`
	// contains filtered or unexported fields
}

func (*Req) Descriptor deprecated

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

Deprecated: Use Req.ProtoReflect.Descriptor instead.

func (*Req) GetId

func (x *Req) GetId() int64

func (*Req) GetMsg

func (x *Req) GetMsg() string

func (*Req) ProtoMessage

func (*Req) ProtoMessage()

func (*Req) ProtoReflect

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

func (*Req) Reset

func (x *Req) Reset()

func (*Req) String

func (x *Req) String() string

type Res

type Res struct {
	Code int32  `protobuf:"varint,1,opt,name=Code,proto3" json:"Code,omitempty"`
	Msg  string `protobuf:"bytes,2,opt,name=Msg,proto3" json:"Msg,omitempty"`
	// contains filtered or unexported fields
}

func (*Res) Descriptor deprecated

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

Deprecated: Use Res.ProtoReflect.Descriptor instead.

func (*Res) GetCode

func (x *Res) GetCode() int32

func (*Res) GetMsg

func (x *Res) GetMsg() string

func (*Res) ProtoMessage

func (*Res) ProtoMessage()

func (*Res) ProtoReflect

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

func (*Res) Reset

func (x *Res) Reset()

func (*Res) String

func (x *Res) String() string

type Server

type Server struct{}

业务实现方法的容器

func (*Server) Bind

func (s *Server) Bind(ctx context.Context, in *Req) (*Res, error)

func (*Server) SendUid

func (s *Server) SendUid(ctx context.Context, in *Req) (*Res, error)

func (*Server) UnBind

func (s *Server) UnBind(ctx context.Context, in *Req) (*Res, error)

type UnimplementedNoticeServer

type UnimplementedNoticeServer struct {
}

UnimplementedNoticeServer can be embedded to have forward compatible implementations.

func (*UnimplementedNoticeServer) Bind

func (*UnimplementedNoticeServer) SendUid

func (*UnimplementedNoticeServer) UnBind

Jump to

Keyboard shortcuts

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