Documentation ¶
Index ¶
- Variables
- func RegisterDifferentServer(s grpc.ServiceRegistrar, srv DifferentServer)
- func RegisterPublicServer(s grpc.ServiceRegistrar, srv PublicServer)
- func RegisterRestrictedServer(s grpc.ServiceRegistrar, srv RestrictedServer)
- type DifferentClient
- type DifferentServer
- type PublicClient
- type PublicServer
- type Request
- type Response
- type RestrictedClient
- type RestrictedServer
- type UnimplementedDifferentServer
- type UnimplementedPublicServer
- type UnimplementedRestrictedServer
- type UnsafeDifferentServer
- type UnsafePublicServer
- type UnsafeRestrictedServer
Constants ¶
This section is empty.
Variables ¶
var Different_ServiceDesc = grpc.ServiceDesc{ ServiceName: "main.Different", HandlerType: (*DifferentServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CallDifferent", Handler: _Different_CallDifferent_Handler, }, { MethodName: "Shazz", Handler: _Different_Shazz_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "svc.proto", }
Different_ServiceDesc is the grpc.ServiceDesc for Different service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_svc_proto protoreflect.FileDescriptor
var Public_ServiceDesc = grpc.ServiceDesc{ ServiceName: "main.Public", HandlerType: (*PublicServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CallMe", Handler: _Public_CallMe_Handler, }, { MethodName: "Ping", Handler: _Public_Ping_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "svc.proto", }
Public_ServiceDesc is the grpc.ServiceDesc for Public service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var Restricted_ServiceDesc = grpc.ServiceDesc{ ServiceName: "main.Restricted", HandlerType: (*RestrictedServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CallHere", Handler: _Restricted_CallHere_Handler, }, { MethodName: "CallThere", Handler: _Restricted_CallThere_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "svc.proto", }
Restricted_ServiceDesc is the grpc.ServiceDesc for Restricted service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterDifferentServer ¶
func RegisterDifferentServer(s grpc.ServiceRegistrar, srv DifferentServer)
func RegisterPublicServer ¶
func RegisterPublicServer(s grpc.ServiceRegistrar, srv PublicServer)
func RegisterRestrictedServer ¶
func RegisterRestrictedServer(s grpc.ServiceRegistrar, srv RestrictedServer)
Types ¶
type DifferentClient ¶
type DifferentClient interface { CallDifferent(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) Shazz(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) }
DifferentClient is the client API for Different 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 NewDifferentClient ¶
func NewDifferentClient(cc grpc.ClientConnInterface) DifferentClient
type DifferentServer ¶
type DifferentServer interface { CallDifferent(context.Context, *Request) (*Response, error) Shazz(context.Context, *Request) (*Response, error) }
DifferentServer is the server API for Different service. All implementations should embed UnimplementedDifferentServer for forward compatibility
type PublicClient ¶
type PublicClient interface { CallMe(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) Ping(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) }
PublicClient is the client API for Public 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 NewPublicClient ¶
func NewPublicClient(cc grpc.ClientConnInterface) PublicClient
type PublicServer ¶
type PublicServer interface { CallMe(context.Context, *Request) (*Response, error) Ping(context.Context, *Request) (*Response, error) }
PublicServer is the server API for Public service. All implementations should embed UnimplementedPublicServer for forward compatibility
type Request ¶
type Request struct { Cmd int64 `protobuf:"varint,1,opt,name=cmd,proto3" json:"cmd,omitempty"` Args string `protobuf:"bytes,2,opt,name=args,proto3" json:"args,omitempty"` // contains filtered or unexported fields }
func (*Request) Descriptor
deprecated
func (*Request) ProtoMessage ¶
func (*Request) ProtoMessage()
func (*Request) ProtoReflect ¶
func (x *Request) ProtoReflect() protoreflect.Message
type Response ¶
type Response struct { Ret int64 `protobuf:"varint,1,opt,name=ret,proto3" json:"ret,omitempty"` Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` // contains filtered or unexported fields }
func (*Response) Descriptor
deprecated
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
func (*Response) ProtoReflect ¶
func (x *Response) ProtoReflect() protoreflect.Message
type RestrictedClient ¶
type RestrictedClient interface { CallHere(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) CallThere(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) }
RestrictedClient is the client API for Restricted 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 NewRestrictedClient ¶
func NewRestrictedClient(cc grpc.ClientConnInterface) RestrictedClient
type RestrictedServer ¶
type RestrictedServer interface { CallHere(context.Context, *Request) (*Response, error) CallThere(context.Context, *Request) (*Response, error) }
RestrictedServer is the server API for Restricted service. All implementations should embed UnimplementedRestrictedServer for forward compatibility
type UnimplementedDifferentServer ¶
type UnimplementedDifferentServer struct { }
UnimplementedDifferentServer should be embedded to have forward compatible implementations.
func (UnimplementedDifferentServer) CallDifferent ¶
type UnimplementedPublicServer ¶
type UnimplementedPublicServer struct { }
UnimplementedPublicServer should be embedded to have forward compatible implementations.
type UnimplementedRestrictedServer ¶
type UnimplementedRestrictedServer struct { }
UnimplementedRestrictedServer should be embedded to have forward compatible implementations.
type UnsafeDifferentServer ¶
type UnsafeDifferentServer interface {
// contains filtered or unexported methods
}
UnsafeDifferentServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to DifferentServer will result in compilation errors.
type UnsafePublicServer ¶
type UnsafePublicServer interface {
// contains filtered or unexported methods
}
UnsafePublicServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to PublicServer will result in compilation errors.
type UnsafeRestrictedServer ¶
type UnsafeRestrictedServer interface {
// contains filtered or unexported methods
}
UnsafeRestrictedServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to RestrictedServer will result in compilation errors.