rpctest

package
v3.30.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_rpctest_proto protoreflect.FileDescriptor
View Source
var FooBar_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "rpctest.FooBar",
	HandlerType: (*FooBarServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Unary",
			Handler:    _FooBar_Unary_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "ClientStream",
			Handler:       _FooBar_ClientStream_Handler,
			ClientStreams: true,
		},
		{
			StreamName:    "ServerStream",
			Handler:       _FooBar_ServerStream_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "BidiStream",
			Handler:       _FooBar_BidiStream_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "rpctest.proto",
}

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

Functions

func RegisterFooBarServer

func RegisterFooBarServer(s grpc.ServiceRegistrar, srv FooBarServer)

Types

type Bar

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

func (*Bar) Descriptor deprecated

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

Deprecated: Use Bar.ProtoReflect.Descriptor instead.

func (*Bar) GetMessage

func (x *Bar) GetMessage() string

func (*Bar) ProtoMessage

func (*Bar) ProtoMessage()

func (*Bar) ProtoReflect added in v3.25.0

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

func (*Bar) Reset

func (x *Bar) Reset()

func (*Bar) String

func (x *Bar) String() string

type Foo

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

func (*Foo) Descriptor deprecated

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

Deprecated: Use Foo.ProtoReflect.Descriptor instead.

func (*Foo) GetMessage

func (x *Foo) GetMessage() string

func (*Foo) ProtoMessage

func (*Foo) ProtoMessage()

func (*Foo) ProtoReflect added in v3.25.0

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

func (*Foo) Reset

func (x *Foo) Reset()

func (*Foo) String

func (x *Foo) String() string

type FooBarClient

type FooBarClient interface {
	Unary(ctx context.Context, in *Foo, opts ...grpc.CallOption) (*Bar, error)
	ClientStream(ctx context.Context, opts ...grpc.CallOption) (FooBar_ClientStreamClient, error)
	ServerStream(ctx context.Context, in *Foo, opts ...grpc.CallOption) (FooBar_ServerStreamClient, error)
	BidiStream(ctx context.Context, opts ...grpc.CallOption) (FooBar_BidiStreamClient, error)
}

FooBarClient is the client API for FooBar 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 NewFooBarClient

func NewFooBarClient(cc grpc.ClientConnInterface) FooBarClient

type FooBarExampleServer

type FooBarExampleServer struct {
	UnimplementedFooBarServer
}

The FooBarExampleServer is an example/test server

func (*FooBarExampleServer) BidiStream

func (s *FooBarExampleServer) BidiStream(stream FooBar_BidiStreamServer) error

BidiStream RPC example

func (*FooBarExampleServer) ClientStream

func (s *FooBarExampleServer) ClientStream(stream FooBar_ClientStreamServer) error

ClientStream RPC example

func (*FooBarExampleServer) ServerStream

func (s *FooBarExampleServer) ServerStream(foo *Foo, stream FooBar_ServerStreamServer) error

ServerStream RPC example

func (*FooBarExampleServer) Unary

func (s *FooBarExampleServer) Unary(ctx context.Context, foo *Foo) (*Bar, error)

Unary RPC example

type FooBarServer

type FooBarServer interface {
	Unary(context.Context, *Foo) (*Bar, error)
	ClientStream(FooBar_ClientStreamServer) error
	ServerStream(*Foo, FooBar_ServerStreamServer) error
	BidiStream(FooBar_BidiStreamServer) error
	// contains filtered or unexported methods
}

FooBarServer is the server API for FooBar service. All implementations must embed UnimplementedFooBarServer for forward compatibility

type FooBar_BidiStreamClient

type FooBar_BidiStreamClient interface {
	Send(*Foo) error
	Recv() (*Bar, error)
	grpc.ClientStream
}

type FooBar_BidiStreamServer

type FooBar_BidiStreamServer interface {
	Send(*Bar) error
	Recv() (*Foo, error)
	grpc.ServerStream
}

type FooBar_ClientStreamClient

type FooBar_ClientStreamClient interface {
	Send(*Foo) error
	CloseAndRecv() (*Bar, error)
	grpc.ClientStream
}

type FooBar_ClientStreamServer

type FooBar_ClientStreamServer interface {
	SendAndClose(*Bar) error
	Recv() (*Foo, error)
	grpc.ServerStream
}

type FooBar_ServerStreamClient

type FooBar_ServerStreamClient interface {
	Recv() (*Bar, error)
	grpc.ClientStream
}

type FooBar_ServerStreamServer

type FooBar_ServerStreamServer interface {
	Send(*Bar) error
	grpc.ServerStream
}

type UnimplementedFooBarServer added in v3.16.2

type UnimplementedFooBarServer struct {
}

UnimplementedFooBarServer must be embedded to have forward compatible implementations.

func (UnimplementedFooBarServer) BidiStream added in v3.16.2

func (UnimplementedFooBarServer) ClientStream added in v3.16.2

func (UnimplementedFooBarServer) ServerStream added in v3.16.2

func (UnimplementedFooBarServer) Unary added in v3.16.2

type UnsafeFooBarServer added in v3.25.0

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

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

Jump to

Keyboard shortcuts

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