testpb

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2021 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_internal_testpb_test_proto protoreflect.FileDescriptor

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.ClientConnInterface) FooClient

func NewTestClient

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

NewTestClient returns a new TestClient.

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"`
	// contains filtered or unexported fields
}

func (*FooRequest) Descriptor deprecated

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

Deprecated: Use FooRequest.ProtoReflect.Descriptor instead.

func (*FooRequest) GetFail

func (x *FooRequest) GetFail() bool

func (*FooRequest) GetSleepNanos

func (x *FooRequest) GetSleepNanos() int64

func (*FooRequest) ProtoMessage

func (*FooRequest) ProtoMessage()

func (*FooRequest) ProtoReflect

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

func (*FooRequest) Reset

func (x *FooRequest) Reset()

func (*FooRequest) String

func (x *FooRequest) String() string

type FooResponse

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

func (*FooResponse) Descriptor deprecated

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

Deprecated: Use FooResponse.ProtoReflect.Descriptor instead.

func (*FooResponse) ProtoMessage

func (*FooResponse) ProtoMessage()

func (*FooResponse) ProtoReflect

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

func (*FooResponse) Reset

func (x *FooResponse) Reset()

func (*FooResponse) String

func (x *FooResponse) String() string

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
}

type UnimplementedFooServer

type UnimplementedFooServer struct {
}

UnimplementedFooServer can be embedded to have forward compatible implementations.

func (*UnimplementedFooServer) Multiple

func (*UnimplementedFooServer) Single

Jump to

Keyboard shortcuts

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