Service

package
v0.0.0-...-858df22 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_Proto_Service_proto protoreflect.FileDescriptor
View Source
var Service_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "service.Service",
	HandlerType: (*ServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Get",
			Handler:    _Service_Get_Handler,
		},
		{
			MethodName: "Put",
			Handler:    _Service_Put_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "Proto/Service.proto",
}

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

Functions

func RegisterServiceServer

func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer)

Types

type GetReply

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

func (*GetReply) Descriptor deprecated

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

Deprecated: Use GetReply.ProtoReflect.Descriptor instead.

func (*GetReply) GetVal

func (x *GetReply) GetVal() int32

func (*GetReply) ProtoMessage

func (*GetReply) ProtoMessage()

func (*GetReply) ProtoReflect

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

func (*GetReply) Reset

func (x *GetReply) Reset()

func (*GetReply) String

func (x *GetReply) String() string

type GetRequest

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

func (*GetRequest) Descriptor deprecated

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

Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.

func (*GetRequest) GetKey

func (x *GetRequest) GetKey() int32

func (*GetRequest) ProtoMessage

func (*GetRequest) ProtoMessage()

func (*GetRequest) ProtoReflect

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

func (*GetRequest) Reset

func (x *GetRequest) Reset()

func (*GetRequest) String

func (x *GetRequest) String() string

type PutReply

type PutReply struct {
	Succes bool `protobuf:"varint,1,opt,name=Succes,proto3" json:"Succes,omitempty"`
	// contains filtered or unexported fields
}

func (*PutReply) Descriptor deprecated

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

Deprecated: Use PutReply.ProtoReflect.Descriptor instead.

func (*PutReply) GetSucces

func (x *PutReply) GetSucces() bool

func (*PutReply) ProtoMessage

func (*PutReply) ProtoMessage()

func (*PutReply) ProtoReflect

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

func (*PutReply) Reset

func (x *PutReply) Reset()

func (*PutReply) String

func (x *PutReply) String() string

type PutRequest

type PutRequest struct {
	Key int32 `protobuf:"varint,1,opt,name=Key,proto3" json:"Key,omitempty"`
	Val int32 `protobuf:"varint,2,opt,name=Val,proto3" json:"Val,omitempty"`
	// contains filtered or unexported fields
}

func (*PutRequest) Descriptor deprecated

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

Deprecated: Use PutRequest.ProtoReflect.Descriptor instead.

func (*PutRequest) GetKey

func (x *PutRequest) GetKey() int32

func (*PutRequest) GetVal

func (x *PutRequest) GetVal() int32

func (*PutRequest) ProtoMessage

func (*PutRequest) ProtoMessage()

func (*PutRequest) ProtoReflect

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

func (*PutRequest) Reset

func (x *PutRequest) Reset()

func (*PutRequest) String

func (x *PutRequest) String() string

type ServiceClient

type ServiceClient interface {
	Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetReply, error)
	Put(ctx context.Context, in *PutRequest, opts ...grpc.CallOption) (*PutReply, error)
}

ServiceClient is the client API for Service 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 NewServiceClient

func NewServiceClient(cc grpc.ClientConnInterface) ServiceClient

type ServiceServer

type ServiceServer interface {
	Get(context.Context, *GetRequest) (*GetReply, error)
	Put(context.Context, *PutRequest) (*PutReply, error)
	// contains filtered or unexported methods
}

ServiceServer is the server API for Service service. All implementations must embed UnimplementedServiceServer for forward compatibility

type UnimplementedServiceServer

type UnimplementedServiceServer struct {
}

UnimplementedServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedServiceServer) Get

func (UnimplementedServiceServer) Put

type UnsafeServiceServer

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

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

Jump to

Keyboard shortcuts

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