Documentation ¶
Index ¶
- Variables
- func BuildTestYARPCProcedures(server TestYARPCServer) []transport.Procedure
- func NewFxTestYARPCClient(name string, options ...v2.ClientOption) interface{}
- func NewFxTestYARPCProcedures() interface{}
- func RegisterTestServer(s *grpc.Server, 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
Constants ¶
This section is empty.
Variables ¶
var File_encoding_protobuf_internal_testpb_v2_test_proto protoreflect.FileDescriptor
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.Server, 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://godoc.org/google.golang.org/grpc#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 }
TestServer is the server API for Test service.
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 can 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)