Documentation ¶
Index ¶
- func NewLocalRoom(opt *room.Info, event event.EventEmitter, addressManager *rpc.AddressManager) (room.Room, error)
- func NewRemoteRoom(connection *room.Connection, opt *room.Info, eventEmitter event.EventEmitter, ...) (room.RemoteRoom, error)
- type BasicManager
- type LocalRoomManager
- func (r *LocalRoomManager) CreateConnection() (*room.Connection, error)
- func (r *LocalRoomManager) CreateRoom(ctx context.Context, info *room.Info) (room.Room, error)
- func (r *LocalRoomManager) GetRoom(ctx context.Context, opt *room.Info) (room.Room, error)
- func (r *LocalRoomManager) GetRooms() []room.Room
- func (r *LocalRoomManager) GetRoomsByGroup(tags map[string]string) []room.Room
- func (r *LocalRoomManager) JoinRoom(ctx context.Context, opt *room.Info, connection *room.Connection) error
- func (r *LocalRoomManager) LeaveRoom(ctx context.Context, opt *room.Info, connection *room.Connection) error
- func (r *LocalRoomManager) RemoveRoom(ctx context.Context, opt *room.Info) error
- func (r *LocalRoomManager) Start()
- func (r *LocalRoomManager) UpdateRoomOption(ctx context.Context, info *room.Info) (room.Room, error)
- type LocalRpcRoomManager
- func (r *LocalRpcRoomManager) CreateConnection(_ *http.Request, req *RpcLocalRoomManagerRequest, ...) error
- func (r *LocalRpcRoomManager) CreateRoom(_ *http.Request, req *RpcLocalRoomManagerRequest, ...) error
- func (r *LocalRpcRoomManager) GetRoom(_ *http.Request, req *RpcLocalRoomManagerRequest, ...) error
- func (r *LocalRpcRoomManager) GetRooms(_ *http.Request, req *RpcLocalRoomManagerRequest, ...) error
- func (r *LocalRpcRoomManager) GetRoomsByGroup(_ *http.Request, req *RpcLocalRoomManagerRequest, ...) error
- func (r *LocalRpcRoomManager) JoinRoom(_ *http.Request, req *RpcLocalRoomManagerRequest, ...) error
- func (r *LocalRpcRoomManager) LeaveRoom(_ *http.Request, req *RpcLocalRoomManagerRequest, ...) error
- func (r *LocalRpcRoomManager) RemoveRoom(_ *http.Request, req *RpcLocalRoomManagerRequest, ...) error
- func (r *LocalRpcRoomManager) UpdateRoomOption(_ *http.Request, req *RpcLocalRoomManagerRequest, ...) error
- type RemoteRpcRoomManager
- func (r *RemoteRpcRoomManager) CreateConnection() *room.Connection
- func (r *RemoteRpcRoomManager) CreateLocalRoom(ctx context.Context, info *room.Info) (room.Room, error)
- func (r *RemoteRpcRoomManager) CreateRemoteRoom(ctx context.Context, info *room.Info) (room.Room, error)
- func (r *RemoteRpcRoomManager) CreateRoom(ctx context.Context, info *room.Info) (room.Room, error)
- func (r *RemoteRpcRoomManager) ForceJoinRoom(ctx context.Context, connection *room.Connection, opt *room.Info, ...) (room.RemoteRoom, error)
- func (r *RemoteRpcRoomManager) GetRoom(ctx context.Context, info *room.Info) (room.Room, error)
- func (r *RemoteRpcRoomManager) GetRoomUsers(ctx context.Context, info *room.Info) ([]*room.Connection, error)
- func (r *RemoteRpcRoomManager) GetRooms(ctx context.Context) ([]room.RemoteRoom, error)
- func (r *RemoteRpcRoomManager) GetRoomsByGroup(ctx context.Context, tags map[string]string) ([]room.RemoteRoom, error)
- func (r *RemoteRpcRoomManager) JoinRoom(ctx context.Context, connection *room.Connection, opt *room.Info) (room.RemoteRoom, error)
- func (r *RemoteRpcRoomManager) LeaveRoom(ctx context.Context, info *room.Info, connection *room.Connection) error
- func (r *RemoteRpcRoomManager) ListRooms(ctx context.Context, tags map[string]string) ([]*room.Info, error)
- func (r *RemoteRpcRoomManager) RemoveRoom(ctx context.Context, info *room.Info) error
- func (r *RemoteRpcRoomManager) Start()
- func (r *RemoteRpcRoomManager) UpdateRoomOption(ctx context.Context, info *room.Info) (*room.Info, error)
- type RpcLocalRoomManagerRequest
- type RpcLocalRoomManagerResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewLocalRoom ¶
func NewLocalRoom(opt *room.Info, event event.EventEmitter, addressManager *rpc.AddressManager) (room.Room, error)
func NewRemoteRoom ¶
func NewRemoteRoom(connection *room.Connection, opt *room.Info, eventEmitter event.EventEmitter, rpcRoom room.RpcRoom) (room.RemoteRoom, error)
Types ¶
type BasicManager ¶
type BasicManager struct { state.StatusMachine // contains filtered or unexported fields }
func NewBasicManager ¶
func NewBasicManager() *BasicManager
type LocalRoomManager ¶
type LocalRoomManager struct { BasicManager AddressManager *rpc.AddressManager // contains filtered or unexported fields }
func NewLocalRoomManager ¶
func NewLocalRoomManager(event event.EventEmitter, addressManager *rpc.AddressManager, maxRoomSize int64) *LocalRoomManager
func (*LocalRoomManager) CreateConnection ¶
func (r *LocalRoomManager) CreateConnection() (*room.Connection, error)
func (*LocalRoomManager) CreateRoom ¶
func (*LocalRoomManager) GetRooms ¶
func (r *LocalRoomManager) GetRooms() []room.Room
func (*LocalRoomManager) GetRoomsByGroup ¶
func (r *LocalRoomManager) GetRoomsByGroup(tags map[string]string) []room.Room
func (*LocalRoomManager) JoinRoom ¶
func (r *LocalRoomManager) JoinRoom(ctx context.Context, opt *room.Info, connection *room.Connection) error
func (*LocalRoomManager) LeaveRoom ¶
func (r *LocalRoomManager) LeaveRoom(ctx context.Context, opt *room.Info, connection *room.Connection) error
func (*LocalRoomManager) RemoveRoom ¶
func (*LocalRoomManager) Start ¶
func (r *LocalRoomManager) Start()
func (*LocalRoomManager) UpdateRoomOption ¶
type LocalRpcRoomManager ¶
type LocalRpcRoomManager struct {
// contains filtered or unexported fields
}
func NewLocalRpcRoomManager ¶
func NewLocalRpcRoomManager(localRoomManager *LocalRoomManager, rpcManager *rpc.RpcManager) (*LocalRpcRoomManager, error)
func (*LocalRpcRoomManager) CreateConnection ¶
func (r *LocalRpcRoomManager) CreateConnection(_ *http.Request, req *RpcLocalRoomManagerRequest, res *RpcLocalRoomManagerResponse) error
func (*LocalRpcRoomManager) CreateRoom ¶
func (r *LocalRpcRoomManager) CreateRoom(_ *http.Request, req *RpcLocalRoomManagerRequest, res *RpcLocalRoomManagerResponse) error
func (*LocalRpcRoomManager) GetRoom ¶
func (r *LocalRpcRoomManager) GetRoom(_ *http.Request, req *RpcLocalRoomManagerRequest, res *RpcLocalRoomManagerResponse) error
func (*LocalRpcRoomManager) GetRooms ¶
func (r *LocalRpcRoomManager) GetRooms(_ *http.Request, req *RpcLocalRoomManagerRequest, res *RpcLocalRoomManagerResponse) error
func (*LocalRpcRoomManager) GetRoomsByGroup ¶
func (r *LocalRpcRoomManager) GetRoomsByGroup(_ *http.Request, req *RpcLocalRoomManagerRequest, res *RpcLocalRoomManagerResponse) error
func (*LocalRpcRoomManager) JoinRoom ¶
func (r *LocalRpcRoomManager) JoinRoom(_ *http.Request, req *RpcLocalRoomManagerRequest, res *RpcLocalRoomManagerResponse) error
func (*LocalRpcRoomManager) LeaveRoom ¶
func (r *LocalRpcRoomManager) LeaveRoom(_ *http.Request, req *RpcLocalRoomManagerRequest, res *RpcLocalRoomManagerResponse) error
func (*LocalRpcRoomManager) RemoveRoom ¶
func (r *LocalRpcRoomManager) RemoveRoom(_ *http.Request, req *RpcLocalRoomManagerRequest, res *RpcLocalRoomManagerResponse) error
func (*LocalRpcRoomManager) UpdateRoomOption ¶
func (r *LocalRpcRoomManager) UpdateRoomOption(_ *http.Request, req *RpcLocalRoomManagerRequest, res *RpcLocalRoomManagerResponse) error
type RemoteRpcRoomManager ¶
type RemoteRpcRoomManager struct { BasicManager AddressManager *localRpc.AddressManager // contains filtered or unexported fields }
func NewRemoteRpcRoomManager ¶
func NewRemoteRpcRoomManager(addressManager *localRpc.AddressManager, rpcManager *localRpc.RpcManager, event event.EventEmitter, localRoomManager *LocalRoomManager) *RemoteRpcRoomManager
func (*RemoteRpcRoomManager) CreateConnection ¶
func (r *RemoteRpcRoomManager) CreateConnection() *room.Connection
func (*RemoteRpcRoomManager) CreateLocalRoom ¶
func (*RemoteRpcRoomManager) CreateRemoteRoom ¶
func (*RemoteRpcRoomManager) CreateRoom ¶
func (*RemoteRpcRoomManager) ForceJoinRoom ¶
func (r *RemoteRpcRoomManager) ForceJoinRoom(ctx context.Context, connection *room.Connection, opt *room.Info, roomOpt *room.Info) (room.RemoteRoom, error)
func (*RemoteRpcRoomManager) GetRoomUsers ¶
func (r *RemoteRpcRoomManager) GetRoomUsers(ctx context.Context, info *room.Info) ([]*room.Connection, error)
func (*RemoteRpcRoomManager) GetRooms ¶
func (r *RemoteRpcRoomManager) GetRooms(ctx context.Context) ([]room.RemoteRoom, error)
func (*RemoteRpcRoomManager) GetRoomsByGroup ¶
func (r *RemoteRpcRoomManager) GetRoomsByGroup(ctx context.Context, tags map[string]string) ([]room.RemoteRoom, error)
func (*RemoteRpcRoomManager) JoinRoom ¶
func (r *RemoteRpcRoomManager) JoinRoom(ctx context.Context, connection *room.Connection, opt *room.Info) (room.RemoteRoom, error)
func (*RemoteRpcRoomManager) LeaveRoom ¶
func (r *RemoteRpcRoomManager) LeaveRoom(ctx context.Context, info *room.Info, connection *room.Connection) error
func (*RemoteRpcRoomManager) RemoveRoom ¶
func (*RemoteRpcRoomManager) Start ¶
func (r *RemoteRpcRoomManager) Start()
func (*RemoteRpcRoomManager) UpdateRoomOption ¶
type RpcLocalRoomManagerRequest ¶
type RpcLocalRoomManagerRequest struct { ContextTimeout int Tags map[string]string Info *room.Info Connection *room.Connection }
func NewRpcLocalRoomManagerRequest ¶
func NewRpcLocalRoomManagerRequest() *RpcLocalRoomManagerRequest
type RpcLocalRoomManagerResponse ¶
type RpcLocalRoomManagerResponse struct { room.BasicRpcResponse Connection *room.Connection Rooms []*localRoom Room *localRoom }
func NewRpcLocalRoomManagerResponse ¶
func NewRpcLocalRoomManagerResponse() *RpcLocalRoomManagerResponse
func (*RpcLocalRoomManagerResponse) GetRooms ¶
func (res *RpcLocalRoomManagerResponse) GetRooms() []room.RemoteRoom
func (*RpcLocalRoomManagerResponse) SetRooms ¶
func (res *RpcLocalRoomManagerResponse) SetRooms(rooms []room.Room)
Click to show internal directories.
Click to hide internal directories.