Documentation ¶
Index ¶
- func Execute(ctx context.Context, cfg config.Config) error
- func NewGRPCServer(ctx context.Context, m *Manager) (*grpc.Server, error)
- type Manager
- func (m *Manager) CloseSubs()
- func (m *Manager) CurrentListeners(ctx context.Context) (eventstream.Stream[radio.Listeners], error)
- func (m *Manager) CurrentSong(ctx context.Context) (eventstream.Stream[*radio.SongUpdate], error)
- func (m *Manager) CurrentStatus(ctx context.Context) (eventstream.Stream[radio.Status], error)
- func (m *Manager) CurrentThread(ctx context.Context) (eventstream.Stream[radio.Thread], error)
- func (m *Manager) CurrentUser(ctx context.Context) (eventstream.Stream[*radio.User], error)
- func (m *Manager) Shutdown()
- func (m *Manager) Status(ctx context.Context) (*radio.Status, error)
- func (m *Manager) UpdateFromStorage(ctx context.Context) error
- func (m *Manager) UpdateListeners(ctx context.Context, listeners radio.Listeners) error
- func (m *Manager) UpdateSong(ctx context.Context, su *radio.SongUpdate) error
- func (m *Manager) UpdateThread(ctx context.Context, thread radio.Thread) error
- func (m *Manager) UpdateUser(ctx context.Context, u *radio.User) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Manager ¶
type Manager struct { Storage radio.StorageService // contains filtered or unexported fields }
Manager manages shared state between different processes
func NewManager ¶
NewManager returns a manager ready for use
func (*Manager) CloseSubs ¶
func (m *Manager) CloseSubs()
CloseSubs calls CloseSubs on all internal manager streams
func (*Manager) CurrentListeners ¶
func (*Manager) CurrentSong ¶
func (m *Manager) CurrentSong(ctx context.Context) (eventstream.Stream[*radio.SongUpdate], error)
func (*Manager) CurrentStatus ¶
func (*Manager) CurrentThread ¶
func (*Manager) CurrentUser ¶
func (*Manager) Shutdown ¶
func (m *Manager) Shutdown()
Shutdown calls Shutdown on all internal manager streams
func (*Manager) UpdateListeners ¶
UpdateListeners sets the listener count
func (*Manager) UpdateSong ¶
UpdateSong sets information about the currently playing song
func (*Manager) UpdateThread ¶
UpdateThread sets the current thread information on the front page and chats
Click to show internal directories.
Click to hide internal directories.