Documentation ¶
Overview ¶
Package foo demonstrates a protobuf package.
We include a doc.go file in here to let protobuild know to place a Go/Protobuf package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var File_github_com_containerd_protobuild_examples_v2_foo_proto protoreflect.FileDescriptor
var Foo_ServiceDesc = grpc.ServiceDesc{ ServiceName: "protobuild.example.v2.Foo", HandlerType: (*FooServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Do", Handler: _Foo_Do_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "github.com/containerd/protobuild/examples/v2/foo.proto", }
Foo_ServiceDesc is the grpc.ServiceDesc for Foo service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterFooServer ¶
func RegisterFooServer(s grpc.ServiceRegistrar, srv FooServer)
Types ¶
type DoRequest ¶
type DoRequest struct { Timestamp *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // contains filtered or unexported fields }
func (*DoRequest) Descriptor
deprecated
func (*DoRequest) GetTimestamp ¶
func (x *DoRequest) GetTimestamp() *timestamppb.Timestamp
func (*DoRequest) ProtoMessage ¶
func (*DoRequest) ProtoMessage()
func (*DoRequest) ProtoReflect ¶
func (x *DoRequest) ProtoReflect() protoreflect.Message
type FooClient ¶
type FooClient interface {
Do(ctx context.Context, in *DoRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
}
FooClient is the client API for Foo 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 NewFooClient ¶
func NewFooClient(cc grpc.ClientConnInterface) FooClient
type FooServer ¶
type FooServer interface { Do(context.Context, *DoRequest) (*emptypb.Empty, error) // contains filtered or unexported methods }
FooServer is the server API for Foo service. All implementations must embed UnimplementedFooServer for forward compatibility
type UnimplementedFooServer ¶
type UnimplementedFooServer struct { }
UnimplementedFooServer must be embedded to have forward compatible implementations.
type UnsafeFooServer ¶
type UnsafeFooServer interface {
// contains filtered or unexported methods
}
UnsafeFooServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to FooServer will result in compilation errors.