octoplex/domain/types.go
2025-02-05 20:32:36 +01:00

38 lines
842 B
Go

package domain
// AppState holds application state.
type AppState struct {
Source Source
Destinations []Destination
}
// Source represents the source, currently always the mediaserver.
type Source struct {
Container Container
Live bool
Listeners int
RTMPURL string
RTMPInternalURL string
}
// Destination is a single destination.
type Destination struct {
Container Container
Live bool
URL string
}
// Container represents the current state of an individual container.
//
// The source of truth is always the Docker daemon, this struct is used only
// for passing asynchronous state.
type Container struct {
ID string
State string
HealthState string
CPUPercent float64
MemoryUsageBytes uint64
RxRate int
TxRate int
}