grpctest

package
v1.4.3 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2021 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterPingPongServer

func RegisterPingPongServer(s *grpc.Server, srv PingPongServer)

func RegisterTestServer

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

Types

type BidirectionalRequest

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

func (*BidirectionalRequest) Descriptor

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

func (*BidirectionalRequest) GetId

func (m *BidirectionalRequest) GetId() uint32

func (*BidirectionalRequest) ProtoMessage

func (*BidirectionalRequest) ProtoMessage()

func (*BidirectionalRequest) Reset

func (m *BidirectionalRequest) Reset()

func (*BidirectionalRequest) String

func (m *BidirectionalRequest) String() string

func (*BidirectionalRequest) XXX_DiscardUnknown

func (m *BidirectionalRequest) XXX_DiscardUnknown()

func (*BidirectionalRequest) XXX_Marshal

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

func (*BidirectionalRequest) XXX_Merge

func (dst *BidirectionalRequest) XXX_Merge(src proto.Message)

func (*BidirectionalRequest) XXX_Size

func (m *BidirectionalRequest) XXX_Size() int

func (*BidirectionalRequest) XXX_Unmarshal

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

type BidirectionalResponse

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

func (*BidirectionalResponse) Descriptor

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

func (*BidirectionalResponse) GetId

func (m *BidirectionalResponse) GetId() uint32

func (*BidirectionalResponse) ProtoMessage

func (*BidirectionalResponse) ProtoMessage()

func (*BidirectionalResponse) Reset

func (m *BidirectionalResponse) Reset()

func (*BidirectionalResponse) String

func (m *BidirectionalResponse) String() string

func (*BidirectionalResponse) XXX_DiscardUnknown

func (m *BidirectionalResponse) XXX_DiscardUnknown()

func (*BidirectionalResponse) XXX_Marshal

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

func (*BidirectionalResponse) XXX_Merge

func (dst *BidirectionalResponse) XXX_Merge(src proto.Message)

func (*BidirectionalResponse) XXX_Size

func (m *BidirectionalResponse) XXX_Size() int

func (*BidirectionalResponse) XXX_Unmarshal

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

type PingPongClient

type PingPongClient interface {
	Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PongResponse, error)
}

PingPongClient is the client API for PingPong service.

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

func NewPingPongClient

func NewPingPongClient(cc *grpc.ClientConn) PingPongClient

type PingPongServer

type PingPongServer interface {
	Ping(context.Context, *PingRequest) (*PongResponse, error)
}

PingPongServer is the server API for PingPong service.

type PingRequest

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

func (*PingRequest) Descriptor

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

func (*PingRequest) ProtoMessage

func (*PingRequest) ProtoMessage()

func (*PingRequest) Reset

func (m *PingRequest) Reset()

func (*PingRequest) String

func (m *PingRequest) String() string

func (*PingRequest) XXX_DiscardUnknown

func (m *PingRequest) XXX_DiscardUnknown()

func (*PingRequest) XXX_Marshal

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

func (*PingRequest) XXX_Merge

func (dst *PingRequest) XXX_Merge(src proto.Message)

func (*PingRequest) XXX_Size

func (m *PingRequest) XXX_Size() int

func (*PingRequest) XXX_Unmarshal

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

type PongResponse

type PongResponse struct {
	Msg                  string   `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*PongResponse) Descriptor

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

func (*PongResponse) GetMsg

func (m *PongResponse) GetMsg() string

func (*PongResponse) ProtoMessage

func (*PongResponse) ProtoMessage()

func (*PongResponse) Reset

func (m *PongResponse) Reset()

func (*PongResponse) String

func (m *PongResponse) String() string

func (*PongResponse) XXX_DiscardUnknown

func (m *PongResponse) XXX_DiscardUnknown()

func (*PongResponse) XXX_Marshal

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

func (*PongResponse) XXX_Merge

func (dst *PongResponse) XXX_Merge(src proto.Message)

func (*PongResponse) XXX_Size

func (m *PongResponse) XXX_Size() int

func (*PongResponse) XXX_Unmarshal

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

type PrintKVRequest

type PrintKVRequest struct {
	Key string `protobuf:"bytes,1,opt,name=Key,proto3" json:"Key,omitempty"`
	// Types that are valid to be assigned to Value:
	//	*PrintKVRequest_ValueString
	//	*PrintKVRequest_ValueInt
	Value                isPrintKVRequest_Value `protobuf_oneof:"Value"`
	XXX_NoUnkeyedLiteral struct{}               `json:"-"`
	XXX_unrecognized     []byte                 `json:"-"`
	XXX_sizecache        int32                  `json:"-"`
}

func (*PrintKVRequest) Descriptor

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

func (*PrintKVRequest) GetKey

func (m *PrintKVRequest) GetKey() string

func (*PrintKVRequest) GetValue

func (m *PrintKVRequest) GetValue() isPrintKVRequest_Value

func (*PrintKVRequest) GetValueInt

func (m *PrintKVRequest) GetValueInt() int32

func (*PrintKVRequest) GetValueString

func (m *PrintKVRequest) GetValueString() string

func (*PrintKVRequest) ProtoMessage

func (*PrintKVRequest) ProtoMessage()

func (*PrintKVRequest) Reset

func (m *PrintKVRequest) Reset()

func (*PrintKVRequest) String

func (m *PrintKVRequest) String() string

func (*PrintKVRequest) XXX_DiscardUnknown

func (m *PrintKVRequest) XXX_DiscardUnknown()

func (*PrintKVRequest) XXX_Marshal

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

func (*PrintKVRequest) XXX_Merge

func (dst *PrintKVRequest) XXX_Merge(src proto.Message)

func (*PrintKVRequest) XXX_OneofFuncs

func (*PrintKVRequest) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

func (*PrintKVRequest) XXX_Size

func (m *PrintKVRequest) XXX_Size() int

func (*PrintKVRequest) XXX_Unmarshal

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

type PrintKVRequest_ValueInt

type PrintKVRequest_ValueInt struct {
	ValueInt int32 `protobuf:"varint,3,opt,name=ValueInt,proto3,oneof"`
}

type PrintKVRequest_ValueString

type PrintKVRequest_ValueString struct {
	ValueString string `protobuf:"bytes,2,opt,name=ValueString,proto3,oneof"`
}

type PrintKVResponse

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

func (*PrintKVResponse) Descriptor

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

func (*PrintKVResponse) ProtoMessage

func (*PrintKVResponse) ProtoMessage()

func (*PrintKVResponse) Reset

func (m *PrintKVResponse) Reset()

func (*PrintKVResponse) String

func (m *PrintKVResponse) String() string

func (*PrintKVResponse) XXX_DiscardUnknown

func (m *PrintKVResponse) XXX_DiscardUnknown()

func (*PrintKVResponse) XXX_Marshal

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

func (*PrintKVResponse) XXX_Merge

func (dst *PrintKVResponse) XXX_Merge(src proto.Message)

func (*PrintKVResponse) XXX_Size

func (m *PrintKVResponse) XXX_Size() int

func (*PrintKVResponse) XXX_Unmarshal

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

type PrintStdioRequest added in v1.1.0

type PrintStdioRequest struct {
	Stdout               []byte   `protobuf:"bytes,1,opt,name=stdout,proto3" json:"stdout,omitempty"`
	Stderr               []byte   `protobuf:"bytes,2,opt,name=stderr,proto3" json:"stderr,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*PrintStdioRequest) Descriptor added in v1.1.0

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

func (*PrintStdioRequest) GetStderr added in v1.1.0

func (m *PrintStdioRequest) GetStderr() []byte

func (*PrintStdioRequest) GetStdout added in v1.1.0

func (m *PrintStdioRequest) GetStdout() []byte

func (*PrintStdioRequest) ProtoMessage added in v1.1.0

func (*PrintStdioRequest) ProtoMessage()

func (*PrintStdioRequest) Reset added in v1.1.0

func (m *PrintStdioRequest) Reset()

func (*PrintStdioRequest) String added in v1.1.0

func (m *PrintStdioRequest) String() string

func (*PrintStdioRequest) XXX_DiscardUnknown added in v1.1.0

func (m *PrintStdioRequest) XXX_DiscardUnknown()

func (*PrintStdioRequest) XXX_Marshal added in v1.1.0

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

func (*PrintStdioRequest) XXX_Merge added in v1.1.0

func (dst *PrintStdioRequest) XXX_Merge(src proto.Message)

func (*PrintStdioRequest) XXX_Size added in v1.1.0

func (m *PrintStdioRequest) XXX_Size() int

func (*PrintStdioRequest) XXX_Unmarshal added in v1.1.0

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

type TestClient

type TestClient interface {
	Double(ctx context.Context, in *TestRequest, opts ...grpc.CallOption) (*TestResponse, error)
	PrintKV(ctx context.Context, in *PrintKVRequest, opts ...grpc.CallOption) (*PrintKVResponse, error)
	Bidirectional(ctx context.Context, in *BidirectionalRequest, opts ...grpc.CallOption) (*BidirectionalResponse, error)
	Stream(ctx context.Context, opts ...grpc.CallOption) (Test_StreamClient, error)
	PrintStdio(ctx context.Context, in *PrintStdioRequest, opts ...grpc.CallOption) (*empty.Empty, 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

func NewTestClient(cc *grpc.ClientConn) TestClient

type TestRequest

type TestRequest struct {
	Input                int32    `protobuf:"varint,1,opt,name=Input,proto3" json:"Input,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*TestRequest) Descriptor

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

func (*TestRequest) GetInput

func (m *TestRequest) GetInput() int32

func (*TestRequest) ProtoMessage

func (*TestRequest) ProtoMessage()

func (*TestRequest) Reset

func (m *TestRequest) Reset()

func (*TestRequest) String

func (m *TestRequest) String() string

func (*TestRequest) XXX_DiscardUnknown

func (m *TestRequest) XXX_DiscardUnknown()

func (*TestRequest) XXX_Marshal

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

func (*TestRequest) XXX_Merge

func (dst *TestRequest) XXX_Merge(src proto.Message)

func (*TestRequest) XXX_Size

func (m *TestRequest) XXX_Size() int

func (*TestRequest) XXX_Unmarshal

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

type TestResponse

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

func (*TestResponse) Descriptor

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

func (*TestResponse) GetOutput

func (m *TestResponse) GetOutput() int32

func (*TestResponse) ProtoMessage

func (*TestResponse) ProtoMessage()

func (*TestResponse) Reset

func (m *TestResponse) Reset()

func (*TestResponse) String

func (m *TestResponse) String() string

func (*TestResponse) XXX_DiscardUnknown

func (m *TestResponse) XXX_DiscardUnknown()

func (*TestResponse) XXX_Marshal

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

func (*TestResponse) XXX_Merge

func (dst *TestResponse) XXX_Merge(src proto.Message)

func (*TestResponse) XXX_Size

func (m *TestResponse) XXX_Size() int

func (*TestResponse) XXX_Unmarshal

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

type TestServer

TestServer is the server API for Test service.

type Test_StreamClient

type Test_StreamClient interface {
	Send(*TestRequest) error
	Recv() (*TestResponse, error)
	grpc.ClientStream
}

type Test_StreamServer

type Test_StreamServer interface {
	Send(*TestResponse) error
	Recv() (*TestRequest, error)
	grpc.ServerStream
}

Jump to

Keyboard shortcuts

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