Documentation ¶
Index ¶
- Variables
- func BuildTestYARPCProcedures(server TestYARPCServer) []transport.Procedure
- func NewFxTestYARPCClient(name string, options ...v2.ClientOption) interface{}
- func NewFxTestYARPCProcedures() interface{}
- func RegisterTestServer(s grpc.ServiceRegistrar, srv TestServer)
- type FxTestYARPCClientParams
- type FxTestYARPCClientResult
- type FxTestYARPCProceduresParams
- type FxTestYARPCProceduresResult
- type TestClient
- type TestMessage
- type TestServer
- type TestServiceDuplexYARPCClient
- type TestServiceDuplexYARPCServer
- type TestYARPCClient
- type TestYARPCServer
- type Test_DuplexClient
- type Test_DuplexServer
- type UnimplementedTestServer
- type UnsafeTestServer
Constants ¶
This section is empty.
Variables ¶
var File_encoding_protobuf_internal_testpb_v2_test_proto protoreflect.FileDescriptor
var Test_ServiceDesc = grpc.ServiceDesc{ ServiceName: "uber.yarpc.encoding.protobuf.Test", HandlerType: (*TestServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Unary", Handler: _Test_Unary_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "Duplex", Handler: _Test_Duplex_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "encoding/protobuf/internal/testpb/v2/test.proto", }
Test_ServiceDesc is the grpc.ServiceDesc for Test service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func BuildTestYARPCProcedures ¶
func BuildTestYARPCProcedures(server TestYARPCServer) []transport.Procedure
BuildTestYARPCProcedures prepares an implementation of the Test service for YARPC registration.
func NewFxTestYARPCClient ¶
func NewFxTestYARPCClient(name string, options ...v2.ClientOption) interface{}
NewFxTestYARPCClient provides a TestYARPCClient to an Fx application using the given name for routing.
fx.Provide( testpb.NewFxTestYARPCClient("service-name"), ... )
func NewFxTestYARPCProcedures ¶
func NewFxTestYARPCProcedures() interface{}
NewFxTestYARPCProcedures provides TestYARPCServer procedures to an Fx application. It expects a TestYARPCServer to be present in the container.
fx.Provide( testpb.NewFxTestYARPCProcedures(), ... )
func RegisterTestServer ¶
func RegisterTestServer(s grpc.ServiceRegistrar, srv TestServer)
Types ¶
type FxTestYARPCClientParams ¶
type FxTestYARPCClientParams struct { fx.In Provider yarpc.ClientConfig AnyResolver v2.AnyResolver `name:"yarpcfx" optional:"true"` Restriction restriction.Checker `optional:"true"` }
FxTestYARPCClientParams defines the input for NewFxTestYARPCClient. It provides the paramaters to get a TestYARPCClient in an Fx application.
type FxTestYARPCClientResult ¶
type FxTestYARPCClientResult struct { fx.Out Client TestYARPCClient }
FxTestYARPCClientResult defines the output of NewFxTestYARPCClient. It provides a TestYARPCClient to an Fx application.
type FxTestYARPCProceduresParams ¶
type FxTestYARPCProceduresParams struct { fx.In Server TestYARPCServer AnyResolver v2.AnyResolver `name:"yarpcfx" optional:"true"` }
FxTestYARPCProceduresParams defines the input for NewFxTestYARPCProcedures. It provides the paramaters to get TestYARPCServer procedures in an Fx application.
type FxTestYARPCProceduresResult ¶
type FxTestYARPCProceduresResult struct { fx.Out Procedures []transport.Procedure `group:"yarpcfx"` ReflectionMeta reflection.ServerMeta `group:"yarpcfx"` }
FxTestYARPCProceduresResult defines the output of NewFxTestYARPCProcedures. It provides TestYARPCServer procedures to an Fx application.
The procedures are provided to the "yarpcfx" value group. Dig 1.2 or newer must be used for this feature to work.
type TestClient ¶
type TestClient interface { Unary(ctx context.Context, in *TestMessage, opts ...grpc.CallOption) (*TestMessage, error) Duplex(ctx context.Context, opts ...grpc.CallOption) (Test_DuplexClient, error) }
TestClient is the client API for Test 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 NewTestClient ¶
func NewTestClient(cc grpc.ClientConnInterface) TestClient
type TestMessage ¶
type TestMessage struct { Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*TestMessage) Descriptor
deprecated
func (*TestMessage) Descriptor() ([]byte, []int)
Deprecated: Use TestMessage.ProtoReflect.Descriptor instead.
func (*TestMessage) GetValue ¶
func (x *TestMessage) GetValue() string
func (*TestMessage) ProtoMessage ¶
func (*TestMessage) ProtoMessage()
func (*TestMessage) ProtoReflect ¶
func (x *TestMessage) ProtoReflect() protoreflect.Message
func (*TestMessage) Reset ¶
func (x *TestMessage) Reset()
func (*TestMessage) String ¶
func (x *TestMessage) String() string
type TestServer ¶
type TestServer interface { Unary(context.Context, *TestMessage) (*TestMessage, error) Duplex(Test_DuplexServer) error // contains filtered or unexported methods }
TestServer is the server API for Test service. All implementations must embed UnimplementedTestServer for forward compatibility
type TestServiceDuplexYARPCClient ¶
type TestServiceDuplexYARPCClient interface { Context() context.Context Send(*TestMessage, ...yarpc.StreamOption) error Recv(...yarpc.StreamOption) (*TestMessage, error) CloseSend(...yarpc.StreamOption) error }
TestServiceDuplexYARPCClient sends TestMessages and receives TestMessages, returning io.EOF when the stream is complete.
type TestServiceDuplexYARPCServer ¶
type TestServiceDuplexYARPCServer interface { Context() context.Context Recv(...yarpc.StreamOption) (*TestMessage, error) Send(*TestMessage, ...yarpc.StreamOption) error }
TestServiceDuplexYARPCServer receives TestMessages and sends TestMessage.
type TestYARPCClient ¶
type TestYARPCClient interface { Unary(context.Context, *TestMessage, ...yarpc.CallOption) (*TestMessage, error) Duplex(context.Context, ...yarpc.CallOption) (TestServiceDuplexYARPCClient, error) }
TestYARPCClient is the YARPC client-side interface for the Test service.
func NewTestYARPCClient ¶
func NewTestYARPCClient(clientConfig transport.ClientConfig, options ...v2.ClientOption) TestYARPCClient
NewTestYARPCClient builds a new YARPC client for the Test service.
type TestYARPCServer ¶
type TestYARPCServer interface { Unary(context.Context, *TestMessage) (*TestMessage, error) Duplex(TestServiceDuplexYARPCServer) error }
TestYARPCServer is the YARPC server-side interface for the Test service.
type Test_DuplexClient ¶
type Test_DuplexClient interface { Send(*TestMessage) error Recv() (*TestMessage, error) grpc.ClientStream }
type Test_DuplexServer ¶
type Test_DuplexServer interface { Send(*TestMessage) error Recv() (*TestMessage, error) grpc.ServerStream }
type UnimplementedTestServer ¶
type UnimplementedTestServer struct { }
UnimplementedTestServer must be embedded to have forward compatible implementations.
func (UnimplementedTestServer) Duplex ¶
func (UnimplementedTestServer) Duplex(Test_DuplexServer) error
func (UnimplementedTestServer) Unary ¶
func (UnimplementedTestServer) Unary(context.Context, *TestMessage) (*TestMessage, error)
type UnsafeTestServer ¶ added in v1.73.0
type UnsafeTestServer interface {
// contains filtered or unexported methods
}
UnsafeTestServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to TestServer will result in compilation errors.