Documentation
¶
Index ¶
- type Config
- type File
- func (m *File) AddRoom(r store.Room, ttl time.Duration) error
- func (m *File) AddSession(sessID, handle, roomID string, ttl time.Duration) error
- func (m *File) ClearSessions(roomID string) error
- func (m *File) ExtendRoomTTL(id string, ttl time.Duration) error
- func (m *File) Get(key string) ([]byte, error)
- func (m *File) GetRoom(id string) (store.Room, error)
- func (m *File) GetSession(sessID, roomID string) (store.Sess, error)
- func (m *File) RemoveRoom(id string) error
- func (m *File) RemoveSession(sessID, roomID string) error
- func (m *File) RoomExists(id string) (bool, error)
- func (m *File) Set(key string, data []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Path string `koanf:"path"`
}
Config represents the file store config structure.
type File ¶
type File struct {
// contains filtered or unexported fields
}
File represents the file implementation of the Store interface.
func (*File) AddSession ¶
AddSession adds a sessionID room to the store.
func (*File) ClearSessions ¶
ClearSessions deletes all the sessions in a room.
func (*File) ExtendRoomTTL ¶
ExtendRoomTTL extends a room's TTL.
func (*File) GetSession ¶
GetSession retrieves a peer session from the store.
func (*File) RemoveRoom ¶
RemoveRoom deletes a room from the store.
func (*File) RemoveSession ¶
RemoveSession deletes a session ID from a room.
func (*File) RoomExists ¶
RoomExists checks if a room exists in the store.
Click to show internal directories.
Click to hide internal directories.