node

package
v0.0.0-...-f378178 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const DeadInterval = 15

Variables

This section is empty.

Functions

This section is empty.

Types

type State

type State struct {
	PlayerState       api.PlayerStateMessage
	SystemInformation api.SystemInformationMessage
	LastUpdatedTS     int64
}

type StateType

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

func New

func New() (nodeState *StateType)

func (*StateType) All

func (mc *StateType) All() map[string]*State

func (*StateType) Delete

func (mc *StateType) Delete(key string)

func (*StateType) Get

func (mc *StateType) Get(key string) (value *State, ok bool)

func (*StateType) Len

func (mc *StateType) Len() (stateSize int)

func (*StateType) Set

func (mc *StateType) Set(key string, value *State)

type Watcher

type Watcher struct {
	LastFMAPIKey    string
	LastFMAPISecret string
	LastFMUsername  string
	LastFMPassword  string
	// contains filtered or unexported fields
}

func NewNodeWatcher

func NewNodeWatcher(lastFMAPIKey, lastFMAPISecret, lastFMUsername, lastFMPassword string) *Watcher

func NewNodeWatcherWithConnection

func NewNodeWatcherWithConnection(lastFMAPIKey, lastFMAPISecret, lastFMUsername, lastFMPassword string) *Watcher

func (*Watcher) ClientWatcher

func (nw *Watcher) ClientWatcher(ctx context.Context, key string, nodeState *StateType)

func (*Watcher) LoginLastFm

func (nw *Watcher) LoginLastFm()

func (*Watcher) Scrobble

func (nw *Watcher) Scrobble(nowPlaying string)

func (*Watcher) ServerWatcher

func (nw *Watcher) ServerWatcher(nodeStates *StateType)

func (*Watcher) SetNowPlaying

func (nw *Watcher) SetNowPlaying(nowPlaying string)

Jump to

Keyboard shortcuts

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