Documentation ¶
Index ¶
- Variables
- func RegisterChittyChatServiceServer(s grpc.ServiceRegistrar, srv ChittyChatServiceServer)
- type ChittyChatServiceClient
- type ChittyChatServiceServer
- type ChittyChatService_JoinClient
- type ChittyChatService_JoinServer
- type ChittyChatService_SendMessageClient
- type ChittyChatService_SendMessageServer
- type JoinRequest
- type LeaveRequest
- func (*LeaveRequest) Descriptor() ([]byte, []int)deprecated
- func (x *LeaveRequest) GetId() string
- func (x *LeaveRequest) GetTime() int32
- func (*LeaveRequest) ProtoMessage()
- func (x *LeaveRequest) ProtoReflect() protoreflect.Message
- func (x *LeaveRequest) Reset()
- func (x *LeaveRequest) String() string
- type Message
- func (*Message) Descriptor() ([]byte, []int)deprecated
- func (x *Message) GetId() string
- func (x *Message) GetMessage() string
- func (x *Message) GetSpecial() bool
- func (x *Message) GetTime() int32
- func (*Message) ProtoMessage()
- func (x *Message) ProtoReflect() protoreflect.Message
- func (x *Message) Reset()
- func (x *Message) String() string
- type ServerResponse
- func (*ServerResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ServerResponse) GetHttpStatusCode() int32
- func (x *ServerResponse) GetTime() int32
- func (*ServerResponse) ProtoMessage()
- func (x *ServerResponse) ProtoReflect() protoreflect.Message
- func (x *ServerResponse) Reset()
- func (x *ServerResponse) String() string
- type UnimplementedChittyChatServiceServer
- func (UnimplementedChittyChatServiceServer) Join(*JoinRequest, ChittyChatService_JoinServer) error
- func (UnimplementedChittyChatServiceServer) Leave(context.Context, *LeaveRequest) (*ServerResponse, error)
- func (UnimplementedChittyChatServiceServer) SendMessage(ChittyChatService_SendMessageServer) error
- type UnsafeChittyChatServiceServer
Constants ¶
This section is empty.
Variables ¶
var ChittyChatService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "chitty_chat.ChittyChatService", HandlerType: (*ChittyChatServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Leave", Handler: _ChittyChatService_Leave_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "Join", Handler: _ChittyChatService_Join_Handler, ServerStreams: true, }, { StreamName: "SendMessage", Handler: _ChittyChatService_SendMessage_Handler, ClientStreams: true, }, }, Metadata: "chitty_chat/chittyChatService.proto", }
ChittyChatService_ServiceDesc is the grpc.ServiceDesc for ChittyChatService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_chitty_chat_chittyChatService_proto protoreflect.FileDescriptor
Functions ¶
func RegisterChittyChatServiceServer ¶
func RegisterChittyChatServiceServer(s grpc.ServiceRegistrar, srv ChittyChatServiceServer)
Types ¶
type ChittyChatServiceClient ¶
type ChittyChatServiceClient interface { // Sends a stream of messages and gets a stream of messages in return Join(ctx context.Context, in *JoinRequest, opts ...grpc.CallOption) (ChittyChatService_JoinClient, error) SendMessage(ctx context.Context, opts ...grpc.CallOption) (ChittyChatService_SendMessageClient, error) Leave(ctx context.Context, in *LeaveRequest, opts ...grpc.CallOption) (*ServerResponse, error) }
ChittyChatServiceClient is the client API for ChittyChatService 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 NewChittyChatServiceClient ¶
func NewChittyChatServiceClient(cc grpc.ClientConnInterface) ChittyChatServiceClient
type ChittyChatServiceServer ¶
type ChittyChatServiceServer interface { // Sends a stream of messages and gets a stream of messages in return Join(*JoinRequest, ChittyChatService_JoinServer) error SendMessage(ChittyChatService_SendMessageServer) error Leave(context.Context, *LeaveRequest) (*ServerResponse, error) // contains filtered or unexported methods }
ChittyChatServiceServer is the server API for ChittyChatService service. All implementations must embed UnimplementedChittyChatServiceServer for forward compatibility
type ChittyChatService_JoinClient ¶
type ChittyChatService_JoinClient interface { Recv() (*Message, error) grpc.ClientStream }
type ChittyChatService_JoinServer ¶
type ChittyChatService_JoinServer interface { Send(*Message) error grpc.ServerStream }
type ChittyChatService_SendMessageClient ¶
type ChittyChatService_SendMessageClient interface { Send(*Message) error CloseAndRecv() (*ServerResponse, error) grpc.ClientStream }
type ChittyChatService_SendMessageServer ¶
type ChittyChatService_SendMessageServer interface { SendAndClose(*ServerResponse) error Recv() (*Message, error) grpc.ServerStream }
type JoinRequest ¶
type JoinRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Time int32 `protobuf:"varint,2,opt,name=time,proto3" json:"time,omitempty"` // contains filtered or unexported fields }
func (*JoinRequest) Descriptor
deprecated
func (*JoinRequest) Descriptor() ([]byte, []int)
Deprecated: Use JoinRequest.ProtoReflect.Descriptor instead.
func (*JoinRequest) GetId ¶
func (x *JoinRequest) GetId() string
func (*JoinRequest) GetTime ¶
func (x *JoinRequest) GetTime() int32
func (*JoinRequest) ProtoMessage ¶
func (*JoinRequest) ProtoMessage()
func (*JoinRequest) ProtoReflect ¶
func (x *JoinRequest) ProtoReflect() protoreflect.Message
func (*JoinRequest) Reset ¶
func (x *JoinRequest) Reset()
func (*JoinRequest) String ¶
func (x *JoinRequest) String() string
type LeaveRequest ¶
type LeaveRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Time int32 `protobuf:"varint,2,opt,name=time,proto3" json:"time,omitempty"` // contains filtered or unexported fields }
func (*LeaveRequest) Descriptor
deprecated
func (*LeaveRequest) Descriptor() ([]byte, []int)
Deprecated: Use LeaveRequest.ProtoReflect.Descriptor instead.
func (*LeaveRequest) GetId ¶
func (x *LeaveRequest) GetId() string
func (*LeaveRequest) GetTime ¶
func (x *LeaveRequest) GetTime() int32
func (*LeaveRequest) ProtoMessage ¶
func (*LeaveRequest) ProtoMessage()
func (*LeaveRequest) ProtoReflect ¶
func (x *LeaveRequest) ProtoReflect() protoreflect.Message
func (*LeaveRequest) Reset ¶
func (x *LeaveRequest) Reset()
func (*LeaveRequest) String ¶
func (x *LeaveRequest) String() string
type Message ¶
type Message struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` Time int32 `protobuf:"varint,3,opt,name=time,proto3" json:"time,omitempty"` Special bool `protobuf:"varint,4,opt,name=special,proto3" json:"special,omitempty"` // contains filtered or unexported fields }
The request message containing the user's message
func (*Message) Descriptor
deprecated
func (*Message) GetMessage ¶
func (*Message) GetSpecial ¶
func (*Message) ProtoMessage ¶
func (*Message) ProtoMessage()
func (*Message) ProtoReflect ¶
func (x *Message) ProtoReflect() protoreflect.Message
type ServerResponse ¶
type ServerResponse struct { HttpStatusCode int32 `protobuf:"varint,1,opt,name=http_status_code,json=httpStatusCode,proto3" json:"http_status_code,omitempty"` Time int32 `protobuf:"varint,2,opt,name=time,proto3" json:"time,omitempty"` // contains filtered or unexported fields }
func (*ServerResponse) Descriptor
deprecated
func (*ServerResponse) Descriptor() ([]byte, []int)
Deprecated: Use ServerResponse.ProtoReflect.Descriptor instead.
func (*ServerResponse) GetHttpStatusCode ¶
func (x *ServerResponse) GetHttpStatusCode() int32
func (*ServerResponse) GetTime ¶
func (x *ServerResponse) GetTime() int32
func (*ServerResponse) ProtoMessage ¶
func (*ServerResponse) ProtoMessage()
func (*ServerResponse) ProtoReflect ¶
func (x *ServerResponse) ProtoReflect() protoreflect.Message
func (*ServerResponse) Reset ¶
func (x *ServerResponse) Reset()
func (*ServerResponse) String ¶
func (x *ServerResponse) String() string
type UnimplementedChittyChatServiceServer ¶
type UnimplementedChittyChatServiceServer struct { }
UnimplementedChittyChatServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedChittyChatServiceServer) Leave ¶
func (UnimplementedChittyChatServiceServer) Leave(context.Context, *LeaveRequest) (*ServerResponse, error)
func (UnimplementedChittyChatServiceServer) SendMessage ¶
func (UnimplementedChittyChatServiceServer) SendMessage(ChittyChatService_SendMessageServer) error
type UnsafeChittyChatServiceServer ¶
type UnsafeChittyChatServiceServer interface {
// contains filtered or unexported methods
}
UnsafeChittyChatServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ChittyChatServiceServer will result in compilation errors.