Documentation ¶
Index ¶
- Variables
- func RegisterBroadcastServer(s *grpc.Server, srv BroadcastServer)
- type BroadcastClient
- type BroadcastServer
- type Broadcast_CreateStreamClient
- type Broadcast_CreateStreamServer
- type Close
- type Connect
- type Message
- func (*Message) Descriptor() ([]byte, []int)deprecated
- func (x *Message) GetContent() string
- func (x *Message) GetId() string
- func (x *Message) GetTimestamp() string
- func (*Message) ProtoMessage()
- func (x *Message) ProtoReflect() protoreflect.Message
- func (x *Message) Reset()
- func (x *Message) String() string
- type UnimplementedBroadcastServer
- type User
Constants ¶
This section is empty.
Variables ¶
View Source
var File_service_proto protoreflect.FileDescriptor
Functions ¶
func RegisterBroadcastServer ¶
func RegisterBroadcastServer(s *grpc.Server, srv BroadcastServer)
Types ¶
type BroadcastClient ¶
type BroadcastClient interface { CreateStream(ctx context.Context, in *Connect, opts ...grpc.CallOption) (Broadcast_CreateStreamClient, error) BroadcastMessage(ctx context.Context, in *Message, opts ...grpc.CallOption) (*Close, error) }
BroadcastClient is the client API for Broadcast service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewBroadcastClient ¶
func NewBroadcastClient(cc grpc.ClientConnInterface) BroadcastClient
type BroadcastServer ¶
type BroadcastServer interface { CreateStream(*Connect, Broadcast_CreateStreamServer) error BroadcastMessage(context.Context, *Message) (*Close, error) }
BroadcastServer is the server API for Broadcast service.
type Broadcast_CreateStreamClient ¶
type Broadcast_CreateStreamClient interface { Recv() (*Message, error) grpc.ClientStream }
type Broadcast_CreateStreamServer ¶
type Broadcast_CreateStreamServer interface { Send(*Message) error grpc.ServerStream }
type Close ¶
type Close struct {
// contains filtered or unexported fields
}
func (*Close) Descriptor
deprecated
func (*Close) ProtoMessage ¶
func (*Close) ProtoMessage()
func (*Close) ProtoReflect ¶
func (x *Close) ProtoReflect() protoreflect.Message
type Connect ¶
type Connect struct { User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` Active bool `protobuf:"varint,2,opt,name=active,proto3" json:"active,omitempty"` // contains filtered or unexported fields }
func (*Connect) Descriptor
deprecated
func (*Connect) ProtoMessage ¶
func (*Connect) ProtoMessage()
func (*Connect) ProtoReflect ¶
func (x *Connect) ProtoReflect() protoreflect.Message
type Message ¶
type Message struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Content string `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"` Timestamp string `protobuf:"bytes,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // contains filtered or unexported fields }
func (*Message) Descriptor
deprecated
func (*Message) GetContent ¶
func (*Message) GetTimestamp ¶
func (*Message) ProtoMessage ¶
func (*Message) ProtoMessage()
func (*Message) ProtoReflect ¶
func (x *Message) ProtoReflect() protoreflect.Message
type UnimplementedBroadcastServer ¶
type UnimplementedBroadcastServer struct { }
UnimplementedBroadcastServer can be embedded to have forward compatible implementations.
func (*UnimplementedBroadcastServer) BroadcastMessage ¶
func (*UnimplementedBroadcastServer) CreateStream ¶
func (*UnimplementedBroadcastServer) CreateStream(*Connect, Broadcast_CreateStreamServer) error
type User ¶
type User struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
func (*User) Descriptor
deprecated
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message
Click to show internal directories.
Click to hide internal directories.