Documentation
¶
Index ¶
Constants ¶
const (
Example_Foo_FullMethodName = "/pbfoo.Example/Foo"
)
Variables ¶
var Example_ServiceDesc = grpc.ServiceDesc{ ServiceName: "pbfoo.Example", HandlerType: (*ExampleServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Foo", Handler: _Example_Foo_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "pbfoo.proto", }
Example_ServiceDesc is the grpc.ServiceDesc for Example service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_pbfoo_proto protoreflect.FileDescriptor
Functions ¶
func RegisterExampleServer ¶
func RegisterExampleServer(s grpc.ServiceRegistrar, srv ExampleServer)
Types ¶
type ExampleClient ¶
type ExampleClient interface {
Foo(ctx context.Context, in *ReqFoo, opts ...grpc.CallOption) (*ResFoo, error)
}
ExampleClient is the client API for Example 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 NewExampleClient ¶
func NewExampleClient(cc grpc.ClientConnInterface) ExampleClient
type ExampleServer ¶
type ExampleServer interface { Foo(context.Context, *ReqFoo) (*ResFoo, error) // contains filtered or unexported methods }
ExampleServer is the server API for Example service. All implementations must embed UnimplementedExampleServer for forward compatibility
type ReqFoo ¶
type ReqFoo struct {
// contains filtered or unexported fields
}
func (*ReqFoo) Descriptor
deprecated
func (*ReqFoo) ProtoMessage ¶
func (*ReqFoo) ProtoMessage()
func (*ReqFoo) ProtoReflect ¶
func (x *ReqFoo) ProtoReflect() protoreflect.Message
type ResFoo ¶
type ResFoo struct { TraceId string `protobuf:"bytes,1,opt,name=trace_id,json=traceId,proto3" json:"trace_id,omitempty"` // contains filtered or unexported fields }
func (*ResFoo) Descriptor
deprecated
func (*ResFoo) GetTraceId ¶
func (*ResFoo) ProtoMessage ¶
func (*ResFoo) ProtoMessage()
func (*ResFoo) ProtoReflect ¶
func (x *ResFoo) ProtoReflect() protoreflect.Message
type UnimplementedExampleServer ¶
type UnimplementedExampleServer struct { }
UnimplementedExampleServer must be embedded to have forward compatible implementations.
type UnsafeExampleServer ¶
type UnsafeExampleServer interface {
// contains filtered or unexported methods
}
UnsafeExampleServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ExampleServer will result in compilation errors.