memory

package
v0.1.21 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 28, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

type Store struct {
	// contains filtered or unexported fields
}

func New

func New() *Store

func NewRegistry

func NewRegistry() *Store

func (*Store) Add

func (s *Store) Add(client *realtime.Client) error

func (*Store) Clients

func (s *Store) Clients(ctx context.Context, roomID string) ([]string, error)

func (*Store) Get

func (s *Store) Get(clientID string) (*realtime.Client, bool)

func (*Store) GetRoomClients

func (s *Store) GetRoomClients(roomID string) []*realtime.Client

func (*Store) GetUserClients

func (s *Store) GetUserClients(userID string) []*realtime.Client

func (*Store) Heartbeat

func (s *Store) Heartbeat(ctx context.Context, clientID string) error

func (*Store) IsOnline

func (s *Store) IsOnline(ctx context.Context, clientID string) (bool, error)

func (*Store) Join

func (s *Store) Join(ctx context.Context, roomID string, clientID string) error

func (*Store) Leave

func (s *Store) Leave(ctx context.Context, roomID string, clientID string) error

func (*Store) Offline

func (s *Store) Offline(ctx context.Context, clientID string) error

func (*Store) Online

func (s *Store) Online(ctx context.Context, clientID string, identity *realtime.Identity) error

func (*Store) Remove

func (s *Store) Remove(clientID string) error

func (*Store) Rooms

func (s *Store) Rooms(ctx context.Context, clientID string) ([]string, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL