example

package
v0.0.0-...-94d0c95 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ExampleService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "v1.ExampleService",
	HandlerType: (*ExampleServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Unary",
			Handler:    _ExampleService_Unary_Handler,
		},
		{
			MethodName: "NoReturn",
			Handler:    _ExampleService_NoReturn_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "ServerStream",
			Handler:       _ExampleService_ServerStream_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "ClientStream",
			Handler:       _ExampleService_ClientStream_Handler,
			ClientStreams: true,
		},
		{
			StreamName:    "BiDirectionalStream",
			Handler:       _ExampleService_BiDirectionalStream_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "example/example.proto",
}

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

View Source
var File_example_example_proto protoreflect.FileDescriptor
View Source
var File_example_noservice_proto protoreflect.FileDescriptor

Functions

func AddExampleServiceServerRegistryTags

func AddExampleServiceServerRegistryTags(server server.Server)

func RegisterExampleServiceServer

func RegisterExampleServiceServer(s grpc.ServiceRegistrar, srv ExampleServiceServer)

Types

type Empty

type Empty struct {
	// contains filtered or unexported fields
}

func (*Empty) Descriptor deprecated

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

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect

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

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

type ExampleServiceClient

type ExampleServiceClient interface {
	Unary(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
	NoReturn(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error)
	ServerStream(ctx context.Context, in *Request, opts ...grpc.CallOption) (ExampleService_ServerStreamClient, error)
	ClientStream(ctx context.Context, opts ...grpc.CallOption) (ExampleService_ClientStreamClient, error)
	BiDirectionalStream(ctx context.Context, opts ...grpc.CallOption) (ExampleService_BiDirectionalStreamClient, error)
}

ExampleServiceClient is the client API for ExampleService 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.

type ExampleServiceGSClient

type ExampleServiceGSClient interface {
	Unary(ctx context.Context, in *Request, opts ...client.CallOption) (*Response, error)
	NoReturn(ctx context.Context, in *Empty, opts ...client.CallOption) (*Empty, error)
	ServerStream(ctx context.Context, in *Request, opts ...client.CallOption) (client.StreamClient, error)
	ClientStream(ctx context.Context, in *Request, opts ...client.CallOption) (client.StreamClient, error)
	BiDirectionalStream(ctx context.Context, in *Request, opts ...client.CallOption) (client.StreamClient, error)
}

func NewExampleServiceGSClient

func NewExampleServiceGSClient(name string, client client.Client, opts ...client.DialOption) ExampleServiceGSClient

type ExampleServiceServer

type ExampleServiceServer interface {
	Unary(context.Context, *Request) (*Response, error)
	NoReturn(context.Context, *empty.Empty) (*empty.Empty, error)
	ServerStream(*Request, ExampleService_ServerStreamServer) error
	ClientStream(ExampleService_ClientStreamServer) error
	BiDirectionalStream(ExampleService_BiDirectionalStreamServer) error
	// contains filtered or unexported methods
}

ExampleServiceServer is the server API for ExampleService service. All implementations must embed UnimplementedExampleServiceServer for forward compatibility

type ExampleService_BiDirectionalStreamClient

type ExampleService_BiDirectionalStreamClient interface {
	Send(*Request) error
	Recv() (*Response, error)
	grpc.ClientStream
}

type ExampleService_BiDirectionalStreamServer

type ExampleService_BiDirectionalStreamServer interface {
	Send(*Response) error
	Recv() (*Request, error)
	grpc.ServerStream
}

type ExampleService_ClientStreamClient

type ExampleService_ClientStreamClient interface {
	Send(*Request) error
	CloseAndRecv() (*Response, error)
	grpc.ClientStream
}

type ExampleService_ClientStreamServer

type ExampleService_ClientStreamServer interface {
	SendAndClose(*Response) error
	Recv() (*Request, error)
	grpc.ServerStream
}

type ExampleService_ServerStreamClient

type ExampleService_ServerStreamClient interface {
	Recv() (*Response, error)
	grpc.ClientStream
}

type ExampleService_ServerStreamServer

type ExampleService_ServerStreamServer interface {
	Send(*Response) error
	grpc.ServerStream
}

type NoServiceMessage

type NoServiceMessage struct {
	Role []string `protobuf:"bytes,1,rep,name=role,proto3" json:"role,omitempty"`
	// contains filtered or unexported fields
}

func (*NoServiceMessage) Descriptor deprecated

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

Deprecated: Use NoServiceMessage.ProtoReflect.Descriptor instead.

func (*NoServiceMessage) GetRole

func (x *NoServiceMessage) GetRole() []string

func (*NoServiceMessage) ProtoMessage

func (*NoServiceMessage) ProtoMessage()

func (*NoServiceMessage) ProtoReflect

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

func (*NoServiceMessage) Reset

func (x *NoServiceMessage) Reset()

func (*NoServiceMessage) String

func (x *NoServiceMessage) String() string

type Request

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

func (*Request) Descriptor deprecated

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

Deprecated: Use Request.ProtoReflect.Descriptor instead.

func (*Request) GetArg

func (x *Request) GetArg() string

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) ProtoReflect

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

func (*Request) Reset

func (x *Request) Reset()

func (*Request) String

func (x *Request) String() string

type Response

type Response struct {
	Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
	// contains filtered or unexported fields
}

func (*Response) Descriptor deprecated

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

Deprecated: Use Response.ProtoReflect.Descriptor instead.

func (*Response) GetSuccess

func (x *Response) GetSuccess() bool

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) ProtoReflect

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

func (*Response) Reset

func (x *Response) Reset()

func (*Response) String

func (x *Response) String() string

type UnimplementedExampleServiceServer

type UnimplementedExampleServiceServer struct {
}

UnimplementedExampleServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedExampleServiceServer) BiDirectionalStream

func (UnimplementedExampleServiceServer) ClientStream

func (UnimplementedExampleServiceServer) NoReturn

func (UnimplementedExampleServiceServer) ServerStream

func (UnimplementedExampleServiceServer) Unary

type UnsafeExampleServiceServer

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

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

Jump to

Keyboard shortcuts

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