grpc

package
v1.99.1 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterBiRequestStreamServer

func RegisterBiRequestStreamServer(s *grpc.Server, srv BiRequestStreamServer)

func RegisterRequestServer

func RegisterRequestServer(s *grpc.Server, srv RequestServer)

func RegisterRequestStreamServer

func RegisterRequestStreamServer(s *grpc.Server, srv RequestStreamServer)

Types

type BiRequestStreamClient

type BiRequestStreamClient interface {
	// Sends a commonRequest
	RequestBiStream(ctx context.Context, opts ...grpc.CallOption) (BiRequestStream_RequestBiStreamClient, error)
}

BiRequestStreamClient is the client API for BiRequestStream service.

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

func NewBiRequestStreamClient

func NewBiRequestStreamClient(cc *grpc.ClientConn) BiRequestStreamClient

type BiRequestStreamServer

type BiRequestStreamServer interface {
	// Sends a commonRequest
	RequestBiStream(BiRequestStream_RequestBiStreamServer) error
}

BiRequestStreamServer is the server API for BiRequestStream service.

type BiRequestStream_RequestBiStreamClient

type BiRequestStream_RequestBiStreamClient interface {
	Send(*Payload) error
	Recv() (*Payload, error)
	grpc.ClientStream
}

type BiRequestStream_RequestBiStreamServer

type BiRequestStream_RequestBiStreamServer interface {
	Send(*Payload) error
	Recv() (*Payload, error)
	grpc.ServerStream
}

type Metadata

type Metadata struct {
	Type                 string            `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`
	ClientIp             string            `protobuf:"bytes,8,opt,name=clientIp,proto3" json:"clientIp,omitempty"`
	Headers              map[string]string `` /* 155-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

func (*Metadata) Descriptor

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

func (*Metadata) GetClientIp

func (m *Metadata) GetClientIp() string

func (*Metadata) GetHeaders

func (m *Metadata) GetHeaders() map[string]string

func (*Metadata) GetType

func (m *Metadata) GetType() string

func (*Metadata) ProtoMessage

func (*Metadata) ProtoMessage()

func (*Metadata) Reset

func (m *Metadata) Reset()

func (*Metadata) String

func (m *Metadata) String() string

func (*Metadata) XXX_DiscardUnknown

func (m *Metadata) XXX_DiscardUnknown()

func (*Metadata) XXX_Marshal

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

func (*Metadata) XXX_Merge

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

func (*Metadata) XXX_Size

func (m *Metadata) XXX_Size() int

func (*Metadata) XXX_Unmarshal

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

type Payload

type Payload struct {
	Metadata             *Metadata `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"`
	Body                 *any.Any  `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"`
	XXX_NoUnkeyedLiteral struct{}  `json:"-"`
	XXX_unrecognized     []byte    `json:"-"`
	XXX_sizecache        int32     `json:"-"`
}

func (*Payload) Descriptor

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

func (*Payload) GetBody

func (m *Payload) GetBody() *any.Any

func (*Payload) GetMetadata

func (m *Payload) GetMetadata() *Metadata

func (*Payload) ProtoMessage

func (*Payload) ProtoMessage()

func (*Payload) Reset

func (m *Payload) Reset()

func (*Payload) String

func (m *Payload) String() string

func (*Payload) XXX_DiscardUnknown

func (m *Payload) XXX_DiscardUnknown()

func (*Payload) XXX_Marshal

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

func (*Payload) XXX_Merge

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

func (*Payload) XXX_Size

func (m *Payload) XXX_Size() int

func (*Payload) XXX_Unmarshal

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

type RequestClient

type RequestClient interface {
	// Sends a commonRequest
	Request(ctx context.Context, in *Payload, opts ...grpc.CallOption) (*Payload, error)
}

RequestClient is the client API for Request service.

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

func NewRequestClient

func NewRequestClient(cc *grpc.ClientConn) RequestClient

type RequestServer

type RequestServer interface {
	// Sends a commonRequest
	Request(context.Context, *Payload) (*Payload, error)
}

RequestServer is the server API for Request service.

type RequestStreamClient

type RequestStreamClient interface {
	// build a streamRequest
	RequestStream(ctx context.Context, in *Payload, opts ...grpc.CallOption) (RequestStream_RequestStreamClient, error)
}

RequestStreamClient is the client API for RequestStream service.

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

func NewRequestStreamClient

func NewRequestStreamClient(cc *grpc.ClientConn) RequestStreamClient

type RequestStreamServer

type RequestStreamServer interface {
	// build a streamRequest
	RequestStream(*Payload, RequestStream_RequestStreamServer) error
}

RequestStreamServer is the server API for RequestStream service.

type RequestStream_RequestStreamClient

type RequestStream_RequestStreamClient interface {
	Recv() (*Payload, error)
	grpc.ClientStream
}

type RequestStream_RequestStreamServer

type RequestStream_RequestStreamServer interface {
	Send(*Payload) error
	grpc.ServerStream
}

type UnimplementedBiRequestStreamServer

type UnimplementedBiRequestStreamServer struct {
}

UnimplementedBiRequestStreamServer can be embedded to have forward compatible implementations.

func (*UnimplementedBiRequestStreamServer) RequestBiStream

type UnimplementedRequestServer

type UnimplementedRequestServer struct {
}

UnimplementedRequestServer can be embedded to have forward compatible implementations.

func (*UnimplementedRequestServer) Request

type UnimplementedRequestStreamServer

type UnimplementedRequestStreamServer struct {
}

UnimplementedRequestStreamServer can be embedded to have forward compatible implementations.

func (*UnimplementedRequestStreamServer) RequestStream

Jump to

Keyboard shortcuts

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