testpb

package
v0.13.4 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterFooServer

func RegisterFooServer(s *grpc.Server, srv FooServer)

Types

type FooClient

type FooClient interface {
	Single(ctx context.Context, in *FooRequest, opts ...grpc.CallOption) (*FooResponse, error)
	Multiple(ctx context.Context, opts ...grpc.CallOption) (Foo_MultipleClient, error)
}

FooClient is the client API for Foo service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewFooClient

func NewFooClient(cc *grpc.ClientConn) FooClient

func NewTestClient

func NewTestClient(l *testing.T) (client FooClient, cleanup func())

NewTestClient is used for internal testing only. It creates a grpc server and client. It returns client and cleanup function to close the connection and gracefully stop the server.

type FooRequest

type FooRequest struct {
	Fail                 bool     `protobuf:"varint,1,opt,name=fail,proto3" json:"fail,omitempty"`
	SleepNanos           int64    `protobuf:"varint,2,opt,name=sleep_nanos,json=sleepNanos,proto3" json:"sleep_nanos,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*FooRequest) Descriptor

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

func (*FooRequest) GetFail

func (m *FooRequest) GetFail() bool

func (*FooRequest) GetSleepNanos

func (m *FooRequest) GetSleepNanos() int64

func (*FooRequest) ProtoMessage

func (*FooRequest) ProtoMessage()

func (*FooRequest) Reset

func (m *FooRequest) Reset()

func (*FooRequest) String

func (m *FooRequest) String() string

func (*FooRequest) XXX_DiscardUnknown added in v0.12.9

func (m *FooRequest) XXX_DiscardUnknown()

func (*FooRequest) XXX_Marshal added in v0.12.9

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

func (*FooRequest) XXX_Merge added in v0.12.9

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

func (*FooRequest) XXX_Size added in v0.12.9

func (m *FooRequest) XXX_Size() int

func (*FooRequest) XXX_Unmarshal added in v0.12.9

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

type FooResponse

type FooResponse struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*FooResponse) Descriptor

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

func (*FooResponse) ProtoMessage

func (*FooResponse) ProtoMessage()

func (*FooResponse) Reset

func (m *FooResponse) Reset()

func (*FooResponse) String

func (m *FooResponse) String() string

func (*FooResponse) XXX_DiscardUnknown added in v0.12.9

func (m *FooResponse) XXX_DiscardUnknown()

func (*FooResponse) XXX_Marshal added in v0.12.9

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

func (*FooResponse) XXX_Merge added in v0.12.9

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

func (*FooResponse) XXX_Size added in v0.12.9

func (m *FooResponse) XXX_Size() int

func (*FooResponse) XXX_Unmarshal added in v0.12.9

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

type FooServer

type FooServer interface {
	Single(context.Context, *FooRequest) (*FooResponse, error)
	Multiple(Foo_MultipleServer) error
}

FooServer is the server API for Foo service.

type Foo_MultipleClient

type Foo_MultipleClient interface {
	Send(*FooRequest) error
	Recv() (*FooResponse, error)
	grpc.ClientStream
}

type Foo_MultipleServer

type Foo_MultipleServer interface {
	Send(*FooResponse) error
	Recv() (*FooRequest, error)
	grpc.ServerStream
}

Jump to

Keyboard shortcuts

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