v2

package
v0.99.4 Latest Latest
Warning

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

Go to latest
Published: May 20, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

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

View Source
var File_github_com_containerd_protobuild_examples_v2_foo_proto protoreflect.FileDescriptor
View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use DoRequest.ProtoReflect.Descriptor instead.

func (*DoRequest) GetTimestamp

func (x *DoRequest) GetTimestamp() *timestamppb.Timestamp

func (*DoRequest) ProtoMessage

func (*DoRequest) ProtoMessage()

func (*DoRequest) ProtoReflect

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

func (*DoRequest) Reset

func (x *DoRequest) Reset()

func (*DoRequest) String

func (x *DoRequest) String() string

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.

func (UnimplementedFooServer) Do

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.

Jump to

Keyboard shortcuts

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