Documentation ¶
Index ¶
- type Connector
- type ConnectorRemote
- func (c *ConnectorRemote) Descriptor(ctx context.Context, names *pitayaprotos.ProtoNames) (*pitayaprotos.ProtoDescriptors, error)
- func (c *ConnectorRemote) Docs(ctx context.Context) (*pitayaprotos.Doc, error)
- func (c *ConnectorRemote) RemoteFunc(ctx context.Context, msg *protos.RPCMsg) (*protos.RPCRes, error)
- type Room
- func (r *Room) AfterInit()
- func (r *Room) Entry(ctx context.Context, msg []byte) (*protos.JoinResponse, error)
- func (r *Room) Init()
- func (r *Room) Join(ctx context.Context) (*protos.JoinResponse, error)
- func (r *Room) Message(ctx context.Context, msg *protos.UserMessage)
- func (r *Room) MessageRemote(ctx context.Context, msg *protos.UserMessage, b bool, s string) (*protos.UserMessage, error)
- func (r *Room) SendRPC(ctx context.Context, msg *protos.SendRPCMsg) (*protos.RPCRes, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConnectorRemote ¶
ConnectorRemote is a remote that will receive rpc's
func (*ConnectorRemote) Descriptor ¶ added in v1.1.9
func (c *ConnectorRemote) Descriptor(ctx context.Context, names *pitayaprotos.ProtoNames) (*pitayaprotos.ProtoDescriptors, error)
func (*ConnectorRemote) Docs ¶ added in v0.7.6
func (c *ConnectorRemote) Docs(ctx context.Context) (*pitayaprotos.Doc, error)
Docs returns documentation
func (*ConnectorRemote) RemoteFunc ¶
func (c *ConnectorRemote) RemoteFunc(ctx context.Context, msg *protos.RPCMsg) (*protos.RPCRes, error)
RemoteFunc is a function that will be called remotely
type Room ¶
Room represents a component that contains a bundle of room related handler like Join/Message
func (*Room) Message ¶
func (r *Room) Message(ctx context.Context, msg *protos.UserMessage)
Message sync last message to all members
func (*Room) MessageRemote ¶
func (r *Room) MessageRemote(ctx context.Context, msg *protos.UserMessage, b bool, s string) (*protos.UserMessage, error)
MessageRemote just echoes the given message
Click to show internal directories.
Click to hide internal directories.