Documentation
¶
Overview ¶
Package binding holds the selected Plex Media Server and session monitor.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Binding ¶
type Binding struct {
// contains filtered or unexported fields
}
Binding holds the process-wide Plex server selection and live sessions.
func New ¶
New creates a binding that polls sessions at the given interval.
Parameters:
- product: Plex product name sent with API requests.
- clientID: Plex client identifier.
- interval: Session poll interval.
Returns:
- binding: A ready-to-use server binding.
func (*Binding) Clear ¶
func (bind *Binding) Clear()
Clear drops the selected server and stops session monitoring.
func (*Binding) Get ¶
Get returns the selected server.
Returns:
- server: The currently selected Plex server.
- ok: True when a server has been selected.
func (*Binding) Sessions ¶
Sessions returns the latest cached playback sessions.
Returns:
- sessions: A copy of the current session list.
Click to show internal directories.
Click to hide internal directories.