Documentation ¶
Index ¶
- func Execute(ctx context.Context, cfg config.Config) error
- func NewHTTPServer(cfg config.Config, storage radio.StorageService, queue radio.QueueService, ...) (*grpc.Server, error)
- type QueueService
- func (qs *QueueService) AddRequest(ctx context.Context, song radio.Song, identifier string) error
- func (qs *QueueService) Entries(ctx context.Context) ([]radio.QueueEntry, error)
- func (qs *QueueService) Remove(ctx context.Context, id radio.QueueID) (bool, error)
- func (qs *QueueService) ReserveNext(ctx context.Context) (*radio.QueueEntry, error)
- func (qs *QueueService) ResetReserved(ctx context.Context) error
- type Streamer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewHTTPServer ¶
func NewHTTPServer(cfg config.Config, storage radio.StorageService, queue radio.QueueService, announce radio.AnnounceService, streamer *Streamer) (*grpc.Server, error)
NewHTTPServer returns a http server with RPC API handler and debug handlers
Types ¶
type QueueService ¶
type QueueService struct { config.Config Storage radio.StorageService // contains filtered or unexported fields }
QueueService implements radio.QueueService that uses a random population algorithm
func NewQueueService ¶
func NewQueueService(ctx context.Context, cfg config.Config, storage radio.StorageService) (*QueueService, error)
NewQueueService returns you a new QueueService with the configuration given
func (*QueueService) AddRequest ¶
AddRequest implements radio.QueueService
func (*QueueService) Entries ¶
func (qs *QueueService) Entries(ctx context.Context) ([]radio.QueueEntry, error)
Entries returns all entries in the queue
func (*QueueService) ReserveNext ¶
func (qs *QueueService) ReserveNext(ctx context.Context) (*radio.QueueEntry, error)
ReserveNext implements radio.QueueService
func (*QueueService) ResetReserved ¶
func (qs *QueueService) ResetReserved(ctx context.Context) error
ResetReserved implements radio.QueueService
type Streamer ¶
type Streamer struct { config.Config // Format of the PCM audio data AudioFormat audio.AudioFormat // contains filtered or unexported fields }
Streamer represents a single icecast stream
func NewStreamer ¶
func NewStreamer(ctx context.Context, cfg config.Config, queue radio.QueueService) (*Streamer, error)
NewStreamer returns a new streamer using the state given
func (*Streamer) Start ¶
Start starts the streamer with the context given, Start is a noop if already started
Click to show internal directories.
Click to hide internal directories.