stream

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2020 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrStreamSubscribed = errors.New(name + " subscribed")
)

Functions

This section is empty.

Types

type Handler

type Handler interface {
	Serve(message *spotify.CurrentlyPlaying)
}

type HandlerFunc

type HandlerFunc func(playing *spotify.CurrentlyPlaying)

func (HandlerFunc) Serve

func (f HandlerFunc) Serve(playing *spotify.CurrentlyPlaying)

type LoggerFunc

type LoggerFunc func(...interface{})

type Stream

type Stream struct {
	Conn       *spotify.Client
	Handler    Handler
	Interval   time.Duration
	LoggerFunc LoggerFunc
	// contains filtered or unexported fields
}

func (*Stream) RegisterOnShutdown

func (s *Stream) RegisterOnShutdown(f func())

func (*Stream) Shutdown

func (s *Stream) Shutdown(ctx context.Context) error

func (*Stream) Subscribe

func (s *Stream) Subscribe() error

Jump to

Keyboard shortcuts

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