Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterPingPongServiceServer(s grpc.ServiceRegistrar, srv PingPongServiceServer)
- type GetPingRequest
- func (*GetPingRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetPingRequest) GetClientId() string
- func (x *GetPingRequest) GetMessage() string
- func (x *GetPingRequest) GetResponseDelay() time.Duration
- func (x *GetPingRequest) GetResponseDelayInMillis() uint64
- func (*GetPingRequest) ProtoMessage()
- func (x *GetPingRequest) ProtoReflect() protoreflect.Message
- func (x *GetPingRequest) Reset()
- func (x *GetPingRequest) String() string
- type PingPongServiceClient
- type PingPongServiceServer
- type PingPongService_StreamPingClient
- type PingPongService_StreamPingServer
- type PingResponse
- func (*PingResponse) Descriptor() ([]byte, []int)deprecated
- func (x *PingResponse) GetMessage() string
- func (x *PingResponse) GetServerId() string
- func (*PingResponse) ProtoMessage()
- func (x *PingResponse) ProtoReflect() protoreflect.Message
- func (x *PingResponse) Reset()
- func (x *PingResponse) String() string
- type StreamPingRequest
- func (*StreamPingRequest) Descriptor() ([]byte, []int)deprecated
- func (x *StreamPingRequest) GetClientId() string
- func (x *StreamPingRequest) GetMessage() string
- func (x *StreamPingRequest) GetResponseDelay() time.Duration
- func (x *StreamPingRequest) GetResponseDelayInMillis() uint64
- func (x *StreamPingRequest) GetTerminatesAfter() time.Duration
- func (x *StreamPingRequest) GetTerminatesAfterMillis() uint64
- func (*StreamPingRequest) ProtoMessage()
- func (x *StreamPingRequest) ProtoReflect() protoreflect.Message
- func (x *StreamPingRequest) Reset()
- func (x *StreamPingRequest) String() string
- type UnimplementedPingPongServiceServer
- type UnsafePingPongServiceServer
Constants ¶
const ( PingPongService_GetPing_FullMethodName = "/acme.v1.PingPongService/GetPing" PingPongService_StreamPing_FullMethodName = "/acme.v1.PingPongService/StreamPing" )
Variables ¶
var File_acme_v1_acme_proto protoreflect.FileDescriptor
var PingPongService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "acme.v1.PingPongService", HandlerType: (*PingPongServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetPing", Handler: _PingPongService_GetPing_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "StreamPing", Handler: _PingPongService_StreamPing_Handler, ServerStreams: true, }, }, Metadata: "acme/v1/acme.proto", }
PingPongService_ServiceDesc is the grpc.ServiceDesc for PingPongService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterPingPongServiceServer ¶
func RegisterPingPongServiceServer(s grpc.ServiceRegistrar, srv PingPongServiceServer)
Types ¶
type GetPingRequest ¶
type GetPingRequest struct { ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` ResponseDelayInMillis uint64 `` /* 129-byte string literal not displayed */ // contains filtered or unexported fields }
func (*GetPingRequest) Descriptor
deprecated
func (*GetPingRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetPingRequest.ProtoReflect.Descriptor instead.
func (*GetPingRequest) GetClientId ¶
func (x *GetPingRequest) GetClientId() string
func (*GetPingRequest) GetMessage ¶
func (x *GetPingRequest) GetMessage() string
func (*GetPingRequest) GetResponseDelay ¶
func (x *GetPingRequest) GetResponseDelay() time.Duration
func (*GetPingRequest) GetResponseDelayInMillis ¶
func (x *GetPingRequest) GetResponseDelayInMillis() uint64
func (*GetPingRequest) ProtoMessage ¶
func (*GetPingRequest) ProtoMessage()
func (*GetPingRequest) ProtoReflect ¶
func (x *GetPingRequest) ProtoReflect() protoreflect.Message
func (*GetPingRequest) Reset ¶
func (x *GetPingRequest) Reset()
func (*GetPingRequest) String ¶
func (x *GetPingRequest) String() string
type PingPongServiceClient ¶
type PingPongServiceClient interface { GetPing(ctx context.Context, in *GetPingRequest, opts ...grpc.CallOption) (*PingResponse, error) StreamPing(ctx context.Context, in *StreamPingRequest, opts ...grpc.CallOption) (PingPongService_StreamPingClient, error) }
PingPongServiceClient is the client API for PingPongService 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 NewPingPongServiceClient ¶
func NewPingPongServiceClient(cc grpc.ClientConnInterface) PingPongServiceClient
type PingPongServiceServer ¶
type PingPongServiceServer interface { GetPing(context.Context, *GetPingRequest) (*PingResponse, error) StreamPing(*StreamPingRequest, PingPongService_StreamPingServer) error // contains filtered or unexported methods }
PingPongServiceServer is the server API for PingPongService service. All implementations must embed UnimplementedPingPongServiceServer for forward compatibility
func NewPingPongServiceServerImpl ¶
func NewPingPongServiceServerImpl(id string, logger *zap.Logger) PingPongServiceServer
type PingPongService_StreamPingClient ¶
type PingPongService_StreamPingClient interface { Recv() (*PingResponse, error) grpc.ClientStream }
type PingPongService_StreamPingServer ¶
type PingPongService_StreamPingServer interface { Send(*PingResponse) error grpc.ServerStream }
type PingResponse ¶
type PingResponse struct { ServerId string `protobuf:"bytes,1,opt,name=server_id,json=serverId,proto3" json:"server_id,omitempty"` Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*PingResponse) Descriptor
deprecated
func (*PingResponse) Descriptor() ([]byte, []int)
Deprecated: Use PingResponse.ProtoReflect.Descriptor instead.
func (*PingResponse) GetMessage ¶
func (x *PingResponse) GetMessage() string
func (*PingResponse) GetServerId ¶
func (x *PingResponse) GetServerId() string
func (*PingResponse) ProtoMessage ¶
func (*PingResponse) ProtoMessage()
func (*PingResponse) ProtoReflect ¶
func (x *PingResponse) ProtoReflect() protoreflect.Message
func (*PingResponse) Reset ¶
func (x *PingResponse) Reset()
func (*PingResponse) String ¶
func (x *PingResponse) String() string
type StreamPingRequest ¶
type StreamPingRequest struct { ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` ResponseDelayInMillis uint64 `` /* 129-byte string literal not displayed */ TerminatesAfterMillis uint64 `` /* 127-byte string literal not displayed */ // contains filtered or unexported fields }
func (*StreamPingRequest) Descriptor
deprecated
func (*StreamPingRequest) Descriptor() ([]byte, []int)
Deprecated: Use StreamPingRequest.ProtoReflect.Descriptor instead.
func (*StreamPingRequest) GetClientId ¶
func (x *StreamPingRequest) GetClientId() string
func (*StreamPingRequest) GetMessage ¶
func (x *StreamPingRequest) GetMessage() string
func (*StreamPingRequest) GetResponseDelay ¶
func (x *StreamPingRequest) GetResponseDelay() time.Duration
func (*StreamPingRequest) GetResponseDelayInMillis ¶
func (x *StreamPingRequest) GetResponseDelayInMillis() uint64
func (*StreamPingRequest) GetTerminatesAfter ¶
func (x *StreamPingRequest) GetTerminatesAfter() time.Duration
func (*StreamPingRequest) GetTerminatesAfterMillis ¶
func (x *StreamPingRequest) GetTerminatesAfterMillis() uint64
func (*StreamPingRequest) ProtoMessage ¶
func (*StreamPingRequest) ProtoMessage()
func (*StreamPingRequest) ProtoReflect ¶
func (x *StreamPingRequest) ProtoReflect() protoreflect.Message
func (*StreamPingRequest) Reset ¶
func (x *StreamPingRequest) Reset()
func (*StreamPingRequest) String ¶
func (x *StreamPingRequest) String() string
type UnimplementedPingPongServiceServer ¶
type UnimplementedPingPongServiceServer struct { }
UnimplementedPingPongServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedPingPongServiceServer) GetPing ¶
func (UnimplementedPingPongServiceServer) GetPing(context.Context, *GetPingRequest) (*PingResponse, error)
func (UnimplementedPingPongServiceServer) StreamPing ¶
func (UnimplementedPingPongServiceServer) StreamPing(*StreamPingRequest, PingPongService_StreamPingServer) error
type UnsafePingPongServiceServer ¶
type UnsafePingPongServiceServer interface {
// contains filtered or unexported methods
}
UnsafePingPongServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to PingPongServiceServer will result in compilation errors.