grpc_testing

package
v1.32.0 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterTestServiceService added in v1.32.0

func RegisterTestServiceService(s grpc.ServiceRegistrar, srv *TestServiceService)

RegisterTestServiceService registers a service implementation with a gRPC server.

Types

type SimpleRequest

type SimpleRequest struct {
	Id                   int32    `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*SimpleRequest) Descriptor

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

func (*SimpleRequest) GetId added in v1.4.0

func (m *SimpleRequest) GetId() int32

func (*SimpleRequest) ProtoMessage

func (*SimpleRequest) ProtoMessage()

func (*SimpleRequest) Reset

func (m *SimpleRequest) Reset()

func (*SimpleRequest) String

func (m *SimpleRequest) String() string

func (*SimpleRequest) XXX_DiscardUnknown added in v1.12.0

func (m *SimpleRequest) XXX_DiscardUnknown()

func (*SimpleRequest) XXX_Marshal added in v1.12.0

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

func (*SimpleRequest) XXX_Merge added in v1.12.0

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

func (*SimpleRequest) XXX_Size added in v1.12.0

func (m *SimpleRequest) XXX_Size() int

func (*SimpleRequest) XXX_Unmarshal added in v1.12.0

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

type SimpleResponse

type SimpleResponse struct {
	Id                   int32    `protobuf:"varint,3,opt,name=id,proto3" json:"id,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*SimpleResponse) Descriptor

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

func (*SimpleResponse) GetId added in v1.4.0

func (m *SimpleResponse) GetId() int32

func (*SimpleResponse) ProtoMessage

func (*SimpleResponse) ProtoMessage()

func (*SimpleResponse) Reset

func (m *SimpleResponse) Reset()

func (*SimpleResponse) String

func (m *SimpleResponse) String() string

func (*SimpleResponse) XXX_DiscardUnknown added in v1.12.0

func (m *SimpleResponse) XXX_DiscardUnknown()

func (*SimpleResponse) XXX_Marshal added in v1.12.0

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

func (*SimpleResponse) XXX_Merge added in v1.12.0

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

func (*SimpleResponse) XXX_Size added in v1.12.0

func (m *SimpleResponse) XXX_Size() int

func (*SimpleResponse) XXX_Unmarshal added in v1.12.0

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

type TestServiceClient

type TestServiceClient interface {
	// One request followed by one response.
	// The server returns the client id as-is.
	UnaryCall(ctx context.Context, in *SimpleRequest, opts ...grpc.CallOption) (*SimpleResponse, error)
	// A sequence of requests with each request served by the server immediately.
	// As one request could lead to multiple responses, this interface
	// demonstrates the idea of full duplexing.
	FullDuplexCall(ctx context.Context, opts ...grpc.CallOption) (TestService_FullDuplexCallClient, error)
	// Client stream
	ClientStreamCall(ctx context.Context, opts ...grpc.CallOption) (TestService_ClientStreamCallClient, error)
	// Server stream
	ServerStreamCall(ctx context.Context, in *SimpleRequest, opts ...grpc.CallOption) (TestService_ServerStreamCallClient, error)
}

TestServiceClient is the client API for TestService 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.

type TestServiceService added in v1.32.0

type TestServiceService struct {
	// One request followed by one response.
	// The server returns the client id as-is.
	UnaryCall func(context.Context, *SimpleRequest) (*SimpleResponse, error)
	// A sequence of requests with each request served by the server immediately.
	// As one request could lead to multiple responses, this interface
	// demonstrates the idea of full duplexing.
	FullDuplexCall func(TestService_FullDuplexCallServer) error
	// Client stream
	ClientStreamCall func(TestService_ClientStreamCallServer) error
	// Server stream
	ServerStreamCall func(*SimpleRequest, TestService_ServerStreamCallServer) error
}

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

func NewTestServiceService added in v1.32.0

func NewTestServiceService(s interface{}) *TestServiceService

NewTestServiceService creates a new TestServiceService containing the implemented methods of the TestService service in s. Any unimplemented methods will result in the gRPC server returning an UNIMPLEMENTED status to the client. This includes situations where the method handler is misspelled or has the wrong signature. For this reason, this function should be used with great care and is not recommended to be used by most users.

type TestService_ClientStreamCallClient added in v1.4.0

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

type TestService_ClientStreamCallServer added in v1.4.0

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

type TestService_FullDuplexCallClient

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

type TestService_FullDuplexCallServer

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

type TestService_ServerStreamCallClient added in v1.4.0

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

type TestService_ServerStreamCallServer added in v1.4.0

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

type UnstableTestServiceService added in v1.32.0

type UnstableTestServiceService interface {
	// One request followed by one response.
	// The server returns the client id as-is.
	UnaryCall(context.Context, *SimpleRequest) (*SimpleResponse, error)
	// A sequence of requests with each request served by the server immediately.
	// As one request could lead to multiple responses, this interface
	// demonstrates the idea of full duplexing.
	FullDuplexCall(TestService_FullDuplexCallServer) error
	// Client stream
	ClientStreamCall(TestService_ClientStreamCallServer) error
	// Server stream
	ServerStreamCall(*SimpleRequest, TestService_ServerStreamCallServer) error
}

UnstableTestServiceService is the service API for TestService service. New methods may be added to this interface if they are added to the service definition, which is not a backward-compatible change. For this reason, use of this type is not recommended.

Jump to

Keyboard shortcuts

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