Documentation ¶
Index ¶
- Variables
- type API
- func (api *API) GetStats() (*Stats, error)
- func (api *API) KillClient(mount string, id int) error
- func (api *API) KillSource(mount string) error
- func (api *API) ListClients(mount string) ([]*Listener, error)
- func (api *API) ListMounts() ([]*Mount, error)
- func (api *API) MoveClients(from, to string) error
- func (api *API) SetUserAgent(app, version string)
- func (api *API) UpdateFallback(mount, fallback string) error
- func (api *API) UpdateMeta(mount string, meta TrackMeta) error
- type AudioInfo
- type Listener
- type Mount
- type ServerInfo
- type ServerStats
- type Source
- type SourceInfo
- type SourceStats
- type Sources
- type Stats
- type TrackInfo
- type TrackMeta
Constants ¶
This section is empty.
Variables ¶
var ( ErrInitEmptyURL = errors.New("URL can't be empty") ErrInitEmptyUser = errors.New("User can't be empty") ErrInitEmptyPassword = errors.New("Password can't be empty") )
API errors
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct { Client *fasthttp.Client // Client is client for http requests // contains filtered or unexported fields }
API is Confluence API struct
func (*API) KillClient ¶
KillClient kills client with given ID connected to given mount point
func (*API) KillSource ¶
KillSource kills the source with given mount point
func (*API) ListClients ¶
ListClients fetches list of listeners connected to given mount point
func (*API) ListMounts ¶
ListMounts fetches info about mounted sources
func (*API) MoveClients ¶
MoveClients moves clients from one source to another
func (*API) SetUserAgent ¶
SetUserAgent set user-agent string based on app name and version
func (*API) UpdateFallback ¶
UpdateFallback updates fallback for given mount source
type Listener ¶
type Listener struct { ID int `xml:"ID"` IP string `xml:"IP"` UserAgent string `xml:"UserAgent"` Referer string `xml:"Referer"` Lag int `xml:"lag"` Connected int `xml:"Connected"` }
Listener contains info about listener
type Mount ¶
type Mount struct { Path string `xml:"mount,attr"` Listeners int `xml:"listeners"` Connected int `xml:"Connected"` ContentType string `xml:"content-type"` }
Mount contains basic info about source mount
type ServerInfo ¶
ServerInfo contains basic info about Icecast Server
type ServerStats ¶
type ServerStats struct { BannedIPs int ClientConnections int Clients int Connections int FileConnections int ListenerConnections int Listeners int OutgoingBitrate int SourceClientConnections int SourceRelayConnections int SourceTotalConnections int Sources int Stats int StatsConnections int StreamBytesRead int StreamBytesSent int }
ServerStats contains overall Icecast Server statistics
type Source ¶
type Source struct { MetadataUpdated time.Time StreamStarted time.Time Bitrate string Genre string ListenURL string SourceIP string UserAgent string AudioInfo *AudioInfo IceAudioInfo *AudioInfo Info *SourceInfo Stats *SourceStats Track *TrackInfo Public bool }
Source contains info about source
type SourceInfo ¶
SourceInfo contains basic source info
type SourceStats ¶
type SourceStats struct { Connected int IncomingBitrate int OutgoingBitrate int ListenerConnections int ListenerPeak int Listeners int MaxListeners int QueueSize int SlowListeners int TotalBytesRead int TotalBytesSent int }
SourceStats contains source statistics
type Stats ¶
type Stats struct { Admin string Host string Started time.Time Location string Info *ServerInfo Stats *ServerStats Sources Sources }
Stats contains info about Icecast Server