Documentation
¶
Overview ¶
Package proto ...
Index ¶
- Constants
- Variables
- func RegisterStreamsHandler(handler StreamsHandler) server.RegistrationFunc
- type CallRequest
- type CallResponse
- func (*CallResponse) Descriptor() ([]byte, []int)deprecated
- func (x *CallResponse) GetMsg() string
- func (x *CallResponse) GetPayload() []byte
- func (*CallResponse) ProtoMessage()
- func (x *CallResponse) ProtoReflect() protoreflect.Message
- func (x *CallResponse) Reset()
- func (x *CallResponse) String() string
- type DRPCStreamsDescription
- type DRPCStreamsServer
- type DRPCStreamsUnimplementedServer
- type DRPCStreams_AuthorizedCallStream
- type DRPCStreams_CallStream
- type StreamsClient
- type StreamsHandler
- type StreamsServer
- type UnimplementedStreamsServer
- type UnsafeStreamsServer
Constants ¶
const ( Streams_Call_FullMethodName = "/echo.Streams/Call" Streams_AuthorizedCall_FullMethodName = "/echo.Streams/AuthorizedCall" )
const HandlerStreams = "echo.Streams"
HandlerStreams is the name of a service, it's here to static type/reference.
Variables ¶
var File_echo_proto protoreflect.FileDescriptor
var Streams_ServiceDesc = grpc.ServiceDesc{ ServiceName: "echo.Streams", HandlerType: (*StreamsServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Call", Handler: _Streams_Call_Handler, }, { MethodName: "AuthorizedCall", Handler: _Streams_AuthorizedCall_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "echo.proto", }
Streams_ServiceDesc is the grpc.ServiceDesc for Streams service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterStreamsHandler ¶
func RegisterStreamsHandler(handler StreamsHandler) server.RegistrationFunc
RegisterStreamsHandler will return a registration function that can be provided to entrypoints as a handler registration.
Types ¶
type CallRequest ¶
type CallRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
func (*CallRequest) Descriptor
deprecated
func (*CallRequest) Descriptor() ([]byte, []int)
Deprecated: Use CallRequest.ProtoReflect.Descriptor instead.
func (*CallRequest) GetName ¶
func (x *CallRequest) GetName() string
func (*CallRequest) ProtoMessage ¶
func (*CallRequest) ProtoMessage()
func (*CallRequest) ProtoReflect ¶
func (x *CallRequest) ProtoReflect() protoreflect.Message
func (*CallRequest) Reset ¶
func (x *CallRequest) Reset()
func (*CallRequest) String ¶
func (x *CallRequest) String() string
type CallResponse ¶
type CallResponse struct { Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"` Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` // contains filtered or unexported fields }
func (*CallResponse) Descriptor
deprecated
func (*CallResponse) Descriptor() ([]byte, []int)
Deprecated: Use CallResponse.ProtoReflect.Descriptor instead.
func (*CallResponse) GetMsg ¶
func (x *CallResponse) GetMsg() string
func (*CallResponse) GetPayload ¶
func (x *CallResponse) GetPayload() []byte
func (*CallResponse) ProtoMessage ¶
func (*CallResponse) ProtoMessage()
func (*CallResponse) ProtoReflect ¶
func (x *CallResponse) ProtoReflect() protoreflect.Message
func (*CallResponse) Reset ¶
func (x *CallResponse) Reset()
func (*CallResponse) String ¶
func (x *CallResponse) String() string
type DRPCStreamsDescription ¶
type DRPCStreamsDescription struct{}
func (DRPCStreamsDescription) NumMethods ¶
func (DRPCStreamsDescription) NumMethods() int
type DRPCStreamsServer ¶
type DRPCStreamsServer interface { Call(context.Context, *CallRequest) (*CallResponse, error) AuthorizedCall(context.Context, *CallRequest) (*CallResponse, error) }
type DRPCStreamsUnimplementedServer ¶
type DRPCStreamsUnimplementedServer struct{}
func (*DRPCStreamsUnimplementedServer) AuthorizedCall ¶
func (s *DRPCStreamsUnimplementedServer) AuthorizedCall(context.Context, *CallRequest) (*CallResponse, error)
func (*DRPCStreamsUnimplementedServer) Call ¶
func (s *DRPCStreamsUnimplementedServer) Call(context.Context, *CallRequest) (*CallResponse, error)
type DRPCStreams_AuthorizedCallStream ¶
type DRPCStreams_AuthorizedCallStream interface { drpc.Stream SendAndClose(*CallResponse) error }
type DRPCStreams_CallStream ¶
type DRPCStreams_CallStream interface { drpc.Stream SendAndClose(*CallResponse) error }
type StreamsClient ¶
type StreamsClient struct {
// contains filtered or unexported fields
}
StreamsClient is the client for echo.Streams
func NewStreamsClient ¶
func NewStreamsClient(client client.Client) *StreamsClient
NewStreamsClient creates a new client for echo.Streams
func (*StreamsClient) AuthorizedCall ¶
func (c *StreamsClient) AuthorizedCall(ctx context.Context, service string, req *CallRequest, opts ...client.CallOption) (*CallResponse, error)
AuthorizedCall calls AuthorizedCall.
func (*StreamsClient) Call ¶
func (c *StreamsClient) Call(ctx context.Context, service string, req *CallRequest, opts ...client.CallOption) (*CallResponse, error)
Call calls Call.
type StreamsHandler ¶
type StreamsHandler interface { Call(ctx context.Context, req *CallRequest) (*CallResponse, error) AuthorizedCall(ctx context.Context, req *CallRequest) (*CallResponse, error) }
StreamsHandler is the Handler for echo.Streams
type StreamsServer ¶
type StreamsServer interface { Call(context.Context, *CallRequest) (*CallResponse, error) AuthorizedCall(context.Context, *CallRequest) (*CallResponse, error) }
StreamsServer is the server API for Streams service. All implementations should embed UnimplementedStreamsServer for forward compatibility.
type UnimplementedStreamsServer ¶
type UnimplementedStreamsServer struct{}
UnimplementedStreamsServer should be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedStreamsServer) AuthorizedCall ¶
func (UnimplementedStreamsServer) AuthorizedCall(context.Context, *CallRequest) (*CallResponse, error)
func (UnimplementedStreamsServer) Call ¶
func (UnimplementedStreamsServer) Call(context.Context, *CallRequest) (*CallResponse, error)
type UnsafeStreamsServer ¶
type UnsafeStreamsServer interface {
// contains filtered or unexported methods
}
UnsafeStreamsServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to StreamsServer will result in compilation errors.