Documentation ¶
Index ¶
- Variables
- func RegisterBroadcastServer(s *grpc.Server, srv BroadcastServer)
- type BroadcastClient
- type BroadcastServer
- type Broadcast_CreateStreamClient
- type Broadcast_CreateStreamServer
- type Close
- func (*Close) Descriptor() ([]byte, []int)
- func (m *Close) Marshal() (dAtA []byte, err error)
- func (m *Close) MarshalTo(dAtA []byte) (int, error)
- func (m *Close) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Close) ProtoMessage()
- func (m *Close) Reset()
- func (m *Close) Size() (n int)
- func (m *Close) String() string
- func (m *Close) Unmarshal(dAtA []byte) error
- func (m *Close) XXX_DiscardUnknown()
- func (m *Close) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Close) XXX_Merge(src proto.Message)
- func (m *Close) XXX_Size() int
- func (m *Close) XXX_Unmarshal(b []byte) error
- type Connect
- func (*Connect) Descriptor() ([]byte, []int)
- func (m *Connect) GetActive() bool
- func (m *Connect) GetUser() *User
- func (m *Connect) Marshal() (dAtA []byte, err error)
- func (m *Connect) MarshalTo(dAtA []byte) (int, error)
- func (m *Connect) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Connect) ProtoMessage()
- func (m *Connect) Reset()
- func (m *Connect) Size() (n int)
- func (m *Connect) String() string
- func (m *Connect) Unmarshal(dAtA []byte) error
- func (m *Connect) XXX_DiscardUnknown()
- func (m *Connect) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Connect) XXX_Merge(src proto.Message)
- func (m *Connect) XXX_Size() int
- func (m *Connect) XXX_Unmarshal(b []byte) error
- type Message
- func (*Message) Descriptor() ([]byte, []int)
- func (m *Message) GetContent() string
- func (m *Message) GetId() string
- func (m *Message) GetTimestamp() string
- func (m *Message) Marshal() (dAtA []byte, err error)
- func (m *Message) MarshalTo(dAtA []byte) (int, error)
- func (m *Message) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Message) ProtoMessage()
- func (m *Message) Reset()
- func (m *Message) Size() (n int)
- func (m *Message) String() string
- func (m *Message) Unmarshal(dAtA []byte) error
- func (m *Message) XXX_DiscardUnknown()
- func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Message) XXX_Merge(src proto.Message)
- func (m *Message) XXX_Size() int
- func (m *Message) XXX_Unmarshal(b []byte) error
- type UnimplementedBroadcastServer
- type User
- func (*User) Descriptor() ([]byte, []int)
- func (m *User) GetId() string
- func (m *User) GetName() string
- func (m *User) Marshal() (dAtA []byte, err error)
- func (m *User) MarshalTo(dAtA []byte) (int, error)
- func (m *User) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*User) ProtoMessage()
- func (m *User) Reset()
- func (m *User) Size() (n int)
- func (m *User) String() string
- func (m *User) Unmarshal(dAtA []byte) error
- func (m *User) XXX_DiscardUnknown()
- func (m *User) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *User) XXX_Merge(src proto.Message)
- func (m *User) XXX_Size() int
- func (m *User) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
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.ClientConn) 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 { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Close) Descriptor ¶
func (*Close) ProtoMessage ¶
func (*Close) ProtoMessage()
func (*Close) XXX_DiscardUnknown ¶
func (m *Close) XXX_DiscardUnknown()
func (*Close) XXX_Marshal ¶
func (*Close) XXX_Unmarshal ¶
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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Connect) Descriptor ¶
func (*Connect) MarshalToSizedBuffer ¶
func (*Connect) ProtoMessage ¶
func (*Connect) ProtoMessage()
func (*Connect) XXX_DiscardUnknown ¶
func (m *Connect) XXX_DiscardUnknown()
func (*Connect) XXX_Marshal ¶
func (*Connect) XXX_Unmarshal ¶
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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Message) Descriptor ¶
func (*Message) GetContent ¶
func (*Message) GetTimestamp ¶
func (*Message) MarshalToSizedBuffer ¶
func (*Message) ProtoMessage ¶
func (*Message) ProtoMessage()
func (*Message) XXX_DiscardUnknown ¶
func (m *Message) XXX_DiscardUnknown()
func (*Message) XXX_Marshal ¶
func (*Message) XXX_Unmarshal ¶
type UnimplementedBroadcastServer ¶
type UnimplementedBroadcastServer struct { }
UnimplementedBroadcastServer can be embedded to have forward compatible implementations.
func (*UnimplementedBroadcastServer) BroadcastMessage ¶
func (*UnimplementedBroadcastServer) CreateStream ¶
func (*UnimplementedBroadcastServer) CreateStream(req *Connect, srv 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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*User) Descriptor ¶
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) XXX_DiscardUnknown ¶
func (m *User) XXX_DiscardUnknown()
func (*User) XXX_Unmarshal ¶
Click to show internal directories.
Click to hide internal directories.