Documentation ¶
Index ¶
Constants ¶
View Source
const ( MESSAGE_SERVER_DIRECT = "server_direct" MESSAGE_SERVER_BROADCAST = "server_broadcast" MESSAGE_SERVER_PUBLISH = "server_publish" MESSAGE_CLIENT_DIRECT = "client_direct" MESSAGE_CLIENT_BROADCAST = "client_broadcast" MESSAGE_CLIENT_PUBLISH = "client_publish" MESSAGE_CLIENT_SYSTEM = "client_system" MESSAGE_SERVER_SYSTEM = "server_system" MESSAGE_CLIENT_FULL_BROADCAST = "client_full_broadcast" )
View Source
const ROOM_PLUG_DEV = "plugs_dev"
View Source
const ROOM_SYS_DATA = "sys.data"
View Source
const ROOM_SYS_USERS = "sys.users"
View Source
const TAG_CONSOLE_CONN = "sys.console_conn"
View Source
const TAG_REALUSER = "sys.real_user"
Variables ¶
Functions ¶
This section is empty.
Types ¶
type ConnOptions ¶
type DataSheetSyncer ¶
type DataSheetSyncer interface { PushSheetNewRow(source, tenantId, groupId string, sheetId int64, ids []int64, data any) error PushSheetUpdateRow(source, tenantId, groupId string, sheetId int64, ids []int64, data any) error PushSheetDeleteRow(source, tenantId, groupId string, sheetId int64, ids []int64) error }
type DataSyncer ¶
type DataSyncer interface { DataTableSyncer DataSheetSyncer }
type DataTableSyncer ¶
type Hub ¶
type Hub interface { GetSockd() SockdCore GetDataSyncer() DataSyncer GetUserSyncer() UserSyncer }
type Message ¶
type Message struct { XID string `json:"xid,omitempty"` Room string `json:"room,omitempty"` Type string `json:"type,omitempty"` ServerIdent string `json:"server_ident,omitempty"` Payload json.RawMessage `json:"payload,omitempty"` TargetIds []int64 `json:"target_ids,omitempty"` TargetTags []string `json:"target_tags,omitempty"` IgnoreConns []int64 `json:"ignore_conns,omitempty"` FromId int64 `json:"from_id,omitempty"` }
type Options ¶
type Options struct { ServerIdent string Syncer PeerSync SysHelper SystemHelper Logger zerolog.Logger }
type PollResponse ¶
type Sockd ¶
type Sockd interface { SockdCore SockdControl }
type SockdControl ¶
type SockdCore ¶
type SockdCore interface { NewConnection(opts ConnOptions) error SendDirect(ns, room string, connId int64, payload []byte) error SendDirectBatch(ns, room string, conns []int64, payload []byte) error SendBroadcast(ns, room string, ignores []int64, payload []byte) error SendTagged(ns, room string, tags []string, ignores []int64, payload []byte) error RoomUpdateTags(ns, roomId string, opts UpdateTagOptions) error Poll(ns, roomId string, max, min int64) (*PollResponse, error) }
type SystemHelper ¶
type SystemHelper interface {
ParseRoomTkt(tenantId, payload string) (*claim.RoomTagTkt, error)
}
type UpdateTagOptions ¶
Click to show internal directories.
Click to hide internal directories.