testserver

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_testserver_proto protoreflect.FileDescriptor

Functions

func RegisterSampleService

func RegisterSampleService(s grpc.ServiceRegistrar, srv *SampleService)

RegisterSampleService registers a service implementation with a gRPC server.

Types

type SampleClient

type SampleClient interface {
	Simple(ctx context.Context, in *SimpleRequest, opts ...grpc.CallOption) (*SimpleResponse, error)
	BidiStream(ctx context.Context, opts ...grpc.CallOption) (Sample_BidiStreamClient, error)
	ClientStream(ctx context.Context, opts ...grpc.CallOption) (Sample_ClientStreamClient, error)
	ServerStream(ctx context.Context, in *SimpleRequest, opts ...grpc.CallOption) (Sample_ServerStreamClient, error)
}

SampleClient is the client API for Sample 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 NewSampleClient

func NewSampleClient(cc grpc.ClientConnInterface) SampleClient

type SampleService

type SampleService struct {
	Simple       func(context.Context, *SimpleRequest) (*SimpleResponse, error)
	BidiStream   func(Sample_BidiStreamServer) error
	ClientStream func(Sample_ClientStreamServer) error
	ServerStream func(*SimpleRequest, Sample_ServerStreamServer) error
}

SampleService is the service API for Sample service. Fields should be assigned to their respective handler implementations only before RegisterSampleService is called. Any unassigned fields will result in the handler for that method returning an Unimplemented error.

func NewHandler

func NewHandler() *SampleService

type Sample_BidiStreamClient

type Sample_BidiStreamClient interface {
	Send(*SimpleRequest) error
	Recv() (*SimpleResponse, error)
	grpc.ClientStream
}

type Sample_BidiStreamServer

type Sample_BidiStreamServer interface {
	Send(*SimpleResponse) error
	Recv() (*SimpleRequest, error)
	grpc.ServerStream
}

type Sample_ClientStreamClient

type Sample_ClientStreamClient interface {
	Send(*SimpleRequest) error
	CloseAndRecv() (*SimpleResponse, error)
	grpc.ClientStream
}

type Sample_ClientStreamServer

type Sample_ClientStreamServer interface {
	SendAndClose(*SimpleResponse) error
	Recv() (*SimpleRequest, error)
	grpc.ServerStream
}

type Sample_ServerStreamClient

type Sample_ServerStreamClient interface {
	Recv() (*SimpleResponse, error)
	grpc.ClientStream
}

type Sample_ServerStreamServer

type Sample_ServerStreamServer interface {
	Send(*SimpleResponse) error
	grpc.ServerStream
}

type SimpleRequest

type SimpleRequest struct {
	Attr1 string `protobuf:"bytes,1,opt,name=attr1,proto3" json:"attr1,omitempty"`
	// contains filtered or unexported fields
}

func (*SimpleRequest) Descriptor deprecated

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

Deprecated: Use SimpleRequest.ProtoReflect.Descriptor instead.

func (*SimpleRequest) GetAttr1

func (x *SimpleRequest) GetAttr1() string

func (*SimpleRequest) ProtoMessage

func (*SimpleRequest) ProtoMessage()

func (*SimpleRequest) ProtoReflect

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

func (*SimpleRequest) Reset

func (x *SimpleRequest) Reset()

func (*SimpleRequest) String

func (x *SimpleRequest) String() string

type SimpleResponse

type SimpleResponse struct {
	Attr1 string `protobuf:"bytes,1,opt,name=attr1,proto3" json:"attr1,omitempty"`
	// contains filtered or unexported fields
}

func (*SimpleResponse) Descriptor deprecated

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

Deprecated: Use SimpleResponse.ProtoReflect.Descriptor instead.

func (*SimpleResponse) GetAttr1

func (x *SimpleResponse) GetAttr1() string

func (*SimpleResponse) ProtoMessage

func (*SimpleResponse) ProtoMessage()

func (*SimpleResponse) ProtoReflect

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

func (*SimpleResponse) Reset

func (x *SimpleResponse) Reset()

func (*SimpleResponse) String

func (x *SimpleResponse) String() string

Jump to

Keyboard shortcuts

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