pb

package
v0.0.0-...-a36dcc1 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_pb_origin_hello_proto protoreflect.FileDescriptor
View Source
var Hello_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "Hello",
	HandlerType: (*HelloServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Echo",
			Handler:    _Hello_Echo_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Stream",
			Handler:       _Hello_Stream_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "pb/origin-hello.proto",
}

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

Functions

func RegisterHelloServer

func RegisterHelloServer(s grpc.ServiceRegistrar, srv HelloServer)

Types

type EchoRequest

type EchoRequest struct {
	Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*EchoRequest) Descriptor deprecated

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

Deprecated: Use EchoRequest.ProtoReflect.Descriptor instead.

func (*EchoRequest) GetMessage

func (x *EchoRequest) GetMessage() string

func (*EchoRequest) ProtoMessage

func (*EchoRequest) ProtoMessage()

func (*EchoRequest) ProtoReflect

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

func (*EchoRequest) Reset

func (x *EchoRequest) Reset()

func (*EchoRequest) String

func (x *EchoRequest) String() string

type HelloClient

type HelloClient interface {
	Echo(ctx context.Context, in *EchoRequest, opts ...grpc.CallOption) (*EchoRequest, error)
	Stream(ctx context.Context, in *EchoRequest, opts ...grpc.CallOption) (Hello_StreamClient, error)
}

HelloClient is the client API for Hello 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 NewHelloClient

func NewHelloClient(cc grpc.ClientConnInterface) HelloClient

type HelloServer

type HelloServer interface {
	Echo(context.Context, *EchoRequest) (*EchoRequest, error)
	Stream(*EchoRequest, Hello_StreamServer) error
	// contains filtered or unexported methods
}

HelloServer is the server API for Hello service. All implementations must embed UnimplementedHelloServer for forward compatibility

type Hello_StreamClient

type Hello_StreamClient interface {
	Recv() (*EchoRequest, error)
	grpc.ClientStream
}

type Hello_StreamServer

type Hello_StreamServer interface {
	Send(*EchoRequest) error
	grpc.ServerStream
}

type UnimplementedHelloServer

type UnimplementedHelloServer struct {
}

UnimplementedHelloServer must be embedded to have forward compatible implementations.

func (UnimplementedHelloServer) Echo

func (UnimplementedHelloServer) Stream

type UnsafeHelloServer

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

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

Jump to

Keyboard shortcuts

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