testpb

package
v1.60.0 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2022 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthTest        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTest          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTest = fmt.Errorf("proto: unexpected end of group")
)

Functions

func BuildTestYARPCProcedures added in v1.43.0

func BuildTestYARPCProcedures(server TestYARPCServer) []transport.Procedure

BuildTestYARPCProcedures prepares an implementation of the Test service for YARPC registration.

func NewFxTestYARPCClient added in v1.43.0

func NewFxTestYARPCClient(name string, options ...protobuf.ClientOption) interface{}

NewFxTestYARPCClient provides a TestYARPCClient to an Fx application using the given name for routing.

fx.Provide(
  testpb.NewFxTestYARPCClient("service-name"),
  ...
)

func NewFxTestYARPCProcedures added in v1.43.0

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 added in v1.43.0

func RegisterTestServer(s *grpc.Server, srv TestServer)

Types

type FxTestYARPCClientParams added in v1.43.0

type FxTestYARPCClientParams struct {
	fx.In

	Provider    yarpc.ClientConfig
	AnyResolver jsonpb.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 added in v1.43.0

type FxTestYARPCClientResult struct {
	fx.Out

	Client TestYARPCClient
}

FxTestYARPCClientResult defines the output of NewFxTestYARPCClient. It provides a TestYARPCClient to an Fx application.

type FxTestYARPCProceduresParams added in v1.43.0

type FxTestYARPCProceduresParams struct {
	fx.In

	Server      TestYARPCServer
	AnyResolver jsonpb.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 added in v1.43.0

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 added in v1.43.0

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 added in v1.43.0

func NewTestClient(cc *grpc.ClientConn) TestClient

type TestMessage

type TestMessage struct {
	Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
}

func (*TestMessage) Descriptor

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

func (*TestMessage) Equal

func (this *TestMessage) Equal(that interface{}) bool

func (*TestMessage) GetValue

func (m *TestMessage) GetValue() string

func (*TestMessage) GoString

func (this *TestMessage) GoString() string

func (*TestMessage) Marshal

func (m *TestMessage) Marshal() (dAtA []byte, err error)

func (*TestMessage) MarshalTo

func (m *TestMessage) MarshalTo(dAtA []byte) (int, error)

func (*TestMessage) MarshalToSizedBuffer added in v1.43.0

func (m *TestMessage) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*TestMessage) ProtoMessage

func (*TestMessage) ProtoMessage()

func (*TestMessage) Reset

func (m *TestMessage) Reset()

func (*TestMessage) Size

func (m *TestMessage) Size() (n int)

func (*TestMessage) String

func (this *TestMessage) String() string

func (*TestMessage) Unmarshal

func (m *TestMessage) Unmarshal(dAtA []byte) error

func (*TestMessage) XXX_DiscardUnknown

func (m *TestMessage) XXX_DiscardUnknown()

func (*TestMessage) XXX_Marshal

func (m *TestMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TestMessage) XXX_Merge

func (m *TestMessage) XXX_Merge(src proto.Message)

func (*TestMessage) XXX_Size

func (m *TestMessage) XXX_Size() int

func (*TestMessage) XXX_Unmarshal

func (m *TestMessage) XXX_Unmarshal(b []byte) error

type TestServer added in v1.43.0

type TestServer interface {
	Unary(context.Context, *TestMessage) (*TestMessage, error)
	Duplex(Test_DuplexServer) error
}

TestServer is the server API for Test service.

type TestServiceDuplexYARPCClient added in v1.43.0

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 added in v1.43.0

type TestServiceDuplexYARPCServer interface {
	Context() context.Context
	Recv(...yarpc.StreamOption) (*TestMessage, error)
	Send(*TestMessage, ...yarpc.StreamOption) error
}

TestServiceDuplexYARPCServer receives TestMessages and sends TestMessage.

type TestYARPCClient added in v1.43.0

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 added in v1.43.0

func NewTestYARPCClient(clientConfig transport.ClientConfig, options ...protobuf.ClientOption) TestYARPCClient

NewTestYARPCClient builds a new YARPC client for the Test service.

type TestYARPCServer added in v1.43.0

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 added in v1.43.0

type Test_DuplexClient interface {
	Send(*TestMessage) error
	Recv() (*TestMessage, error)
	grpc.ClientStream
}

type Test_DuplexServer added in v1.43.0

type Test_DuplexServer interface {
	Send(*TestMessage) error
	Recv() (*TestMessage, error)
	grpc.ServerStream
}

type UnimplementedTestServer added in v1.43.0

type UnimplementedTestServer struct {
}

UnimplementedTestServer can be embedded to have forward compatible implementations.

func (*UnimplementedTestServer) Duplex added in v1.43.0

func (*UnimplementedTestServer) Unary added in v1.43.0

Jump to

Keyboard shortcuts

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