models

package
v0.0.0-...-31c1c1e Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AllState = []State{
	StateRunning,
	StateIDLe,
}

Functions

This section is empty.

Types

type AVStream

type AVStream struct {
	Input       *AVStreamIo    `json:"input"`
	Output      *AVStreamIo    `json:"output"`
	Aqueue      scalars.Uint64 `json:"aqueue"`
	Queue       scalars.Uint64 `json:"queue"`
	Dup         scalars.Uint64 `json:"dup"`
	Drop        scalars.Uint64 `json:"drop"`
	Enc         scalars.Uint64 `json:"enc"`
	Looping     bool           `json:"looping"`
	Duplicating bool           `json:"duplicating"`
	Gop         string         `json:"gop"`
}

func (*AVStream) UnmarshalRestream

func (a *AVStream) UnmarshalRestream(avstream *app.AVstream)

type AVStreamIo

type AVStreamIo struct {
	State  string         `json:"state"`
	Packet scalars.Uint64 `json:"packet"`
	Time   scalars.Uint64 `json:"time"`
	SizeKb scalars.Uint64 `json:"size_kb"`
}

func (*AVStreamIo) UnmarshalRestream

func (a *AVStreamIo) UnmarshalRestream(io app.AVstreamIO)

type About

type About struct {
	App           string         `json:"app"`
	ID            string         `json:"id"`
	Name          string         `json:"name"`
	CreatedAt     time.Time      `json:"created_at"`
	UptimeSeconds scalars.Uint64 `json:"uptime_seconds"`
	Version       *AboutVersion  `json:"version"`
}

type AboutVersion

type AboutVersion struct {
	Number           string `json:"number"`
	RepositoryCommit string `json:"repository_commit"`
	RepositoryBranch string `json:"repository_branch"`
	BuildDate        string `json:"build_date"`
	Arch             string `json:"arch"`
	Compiler         string `json:"compiler"`
}

type Command

type Command string
const (
	CommandStart   Command = "START"
	CommandStop    Command = "STOP"
	CommandRestart Command = "RESTART"
	CommandReload  Command = "RELOAD"
)

func (Command) IsValid

func (e Command) IsValid() bool

func (Command) MarshalGQL

func (e Command) MarshalGQL(w io.Writer)

func (Command) String

func (e Command) String() string

func (*Command) UnmarshalGQL

func (e *Command) UnmarshalGQL(v interface{}) error

type IProcessReportHistoryEntry

type IProcessReportHistoryEntry interface {
	IsIProcessReportHistoryEntry()
}

type Metric

type Metric struct {
	Name   string                          `json:"name"`
	Labels map[string]interface{}          `json:"labels"`
	Values []*scalars.MetricsResponseValue `json:"values"`
}

type MetricInput

type MetricInput struct {
	Name   string                 `json:"name"`
	Labels map[string]interface{} `json:"labels"`
}

type Metrics

type Metrics struct {
	TimerangeSeconds *int      `json:"timerange_seconds"`
	IntervalSeconds  *int      `json:"interval_seconds"`
	Metrics          []*Metric `json:"metrics"`
}

type MetricsInput

type MetricsInput struct {
	TimerangeSeconds *int           `json:"timerange_seconds"`
	IntervalSeconds  *int           `json:"interval_seconds"`
	Metrics          []*MetricInput `json:"metrics"`
}

type Probe

type Probe struct {
	Streams []*ProbeIo `json:"streams"`
	Log     []string   `json:"log"`
}

func (*Probe) UnmarshalRestream

func (p *Probe) UnmarshalRestream(probe app.Probe)

type ProbeIo

type ProbeIo struct {
	URL             string         `json:"url"`
	Index           scalars.Uint64 `json:"index"`
	Stream          scalars.Uint64 `json:"stream"`
	Language        string         `json:"language"`
	Type            string         `json:"type"`
	Codec           string         `json:"codec"`
	Coder           string         `json:"coder"`
	BitrateKbps     float64        `json:"bitrate_kbps"`
	DurationSeconds float64        `json:"duration_seconds"`
	Fps             float64        `json:"fps"`
	PixFmt          string         `json:"pix_fmt"`
	Width           scalars.Uint64 `json:"width"`
	Height          scalars.Uint64 `json:"height"`
	Sampling        scalars.Uint64 `json:"sampling"`
	Layout          string         `json:"layout"`
	Channels        scalars.Uint64 `json:"channels"`
}

func (*ProbeIo) UnmarshalRestream

func (i *ProbeIo) UnmarshalRestream(io app.ProbeIO)

type Process

type Process struct {
	ID        string                 `json:"id"`
	Type      string                 `json:"type"`
	Reference string                 `json:"reference"`
	CreatedAt time.Time              `json:"created_at"`
	Config    *ProcessConfig         `json:"config"`
	State     *ProcessState          `json:"state"`
	Report    *ProcessReport         `json:"report"`
	Metadata  map[string]interface{} `json:"metadata"`
}

func (*Process) UnmarshalRestream

func (p *Process) UnmarshalRestream(process *app.Process, state *app.State, report *app.Log, metadata map[string]interface{})

type ProcessConfig

type ProcessConfig struct {
	ID                    string               `json:"id"`
	Type                  string               `json:"type"`
	Reference             string               `json:"reference"`
	Input                 []*ProcessConfigIo   `json:"input"`
	Output                []*ProcessConfigIo   `json:"output"`
	Options               []string             `json:"options"`
	Reconnect             bool                 `json:"reconnect"`
	ReconnectDelaySeconds scalars.Uint64       `json:"reconnect_delay_seconds"`
	Autostart             bool                 `json:"autostart"`
	StaleTimeoutSeconds   scalars.Uint64       `json:"stale_timeout_seconds"`
	Limits                *ProcessConfigLimits `json:"limits"`
}

func (*ProcessConfig) UnmarshalRestream

func (c *ProcessConfig) UnmarshalRestream(config *app.Config)

type ProcessConfigIo

type ProcessConfigIo struct {
	ID      string   `json:"id"`
	Address string   `json:"address"`
	Options []string `json:"options"`
}

type ProcessConfigLimits

type ProcessConfigLimits struct {
	CPUUsage       float64        `json:"cpu_usage"`
	MemoryBytes    scalars.Uint64 `json:"memory_bytes"`
	WaitforSeconds scalars.Uint64 `json:"waitfor_seconds"`
}

type ProcessReport

type ProcessReport struct {
	CreatedAt time.Time                    `json:"created_at"`
	Prelude   []string                     `json:"prelude"`
	Log       []*ProcessReportLogEntry     `json:"log"`
	History   []*ProcessReportHistoryEntry `json:"history"`
}

func (ProcessReport) IsIProcessReportHistoryEntry

func (ProcessReport) IsIProcessReportHistoryEntry()

func (*ProcessReport) UnmarshalRestream

func (r *ProcessReport) UnmarshalRestream(report *app.Log)

type ProcessReportHistoryEntry

type ProcessReportHistoryEntry struct {
	CreatedAt time.Time                `json:"created_at"`
	Prelude   []string                 `json:"prelude"`
	Log       []*ProcessReportLogEntry `json:"log"`
}

func (ProcessReportHistoryEntry) IsIProcessReportHistoryEntry

func (ProcessReportHistoryEntry) IsIProcessReportHistoryEntry()

func (*ProcessReportHistoryEntry) UnmarshalRestream

func (h *ProcessReportHistoryEntry) UnmarshalRestream(entry app.LogHistoryEntry)

type ProcessReportLogEntry

type ProcessReportLogEntry struct {
	Timestamp time.Time `json:"timestamp"`
	Data      string    `json:"data"`
}

type ProcessState

type ProcessState struct {
	Order            string         `json:"order"`
	State            string         `json:"state"`
	RuntimeSeconds   scalars.Uint64 `json:"runtime_seconds"`
	ReconnectSeconds int            `json:"reconnect_seconds"`
	LastLogline      string         `json:"last_logline"`
	Progress         *Progress      `json:"progress"`
	MemoryBytes      scalars.Uint64 `json:"memory_bytes"`
	CPUUsage         float64        `json:"cpu_usage"`
	Command          []string       `json:"command"`
}

func (*ProcessState) UnmarshalRestream

func (s *ProcessState) UnmarshalRestream(state *app.State)

type Progress

type Progress struct {
	Input       []*ProgressIo  `json:"input"`
	Output      []*ProgressIo  `json:"output"`
	Frame       scalars.Uint64 `json:"frame"`
	Packet      scalars.Uint64 `json:"packet"`
	Fps         float64        `json:"fps"`
	Q           float64        `json:"q"`
	SizeKb      scalars.Uint64 `json:"size_kb"`
	Time        float64        `json:"time"`
	BitrateKbit float64        `json:"bitrate_kbit"`
	Speed       float64        `json:"speed"`
	Drop        scalars.Uint64 `json:"drop"`
	Dup         scalars.Uint64 `json:"dup"`
}

func (*Progress) UnmarshalRestream

func (p *Progress) UnmarshalRestream(progress *app.Progress)

type ProgressIo

type ProgressIo struct {
	ID          string         `json:"id"`
	Address     string         `json:"address"`
	Index       scalars.Uint64 `json:"index"`
	Stream      scalars.Uint64 `json:"stream"`
	Format      string         `json:"format"`
	Type        string         `json:"type"`
	Codec       string         `json:"codec"`
	Coder       string         `json:"coder"`
	Frame       scalars.Uint64 `json:"frame"`
	Fps         float64        `json:"fps"`
	Packet      scalars.Uint64 `json:"packet"`
	Pps         float64        `json:"pps"`
	SizeKb      scalars.Uint64 `json:"size_kb"`
	BitrateKbit float64        `json:"bitrate_kbit"`
	Pixfmt      string         `json:"pixfmt"`
	Q           float64        `json:"q"`
	Width       scalars.Uint64 `json:"width"`
	Height      scalars.Uint64 `json:"height"`
	Sampling    scalars.Uint64 `json:"sampling"`
	Layout      string         `json:"layout"`
	Channels    scalars.Uint64 `json:"channels"`
	Avstream    *AVStream      `json:"avstream"`
}

func (*ProgressIo) UnmarshalRestream

func (p *ProgressIo) UnmarshalRestream(io *app.ProgressIO)

type RawAVstream

type RawAVstream struct {
	ID          string           `json:"id"`
	URL         string           `json:"url"`
	Stream      scalars.Uint64   `json:"stream"`
	Queue       scalars.Uint64   `json:"queue"`
	Aqueue      scalars.Uint64   `json:"aqueue"`
	Dup         scalars.Uint64   `json:"dup"`
	Drop        scalars.Uint64   `json:"drop"`
	Enc         scalars.Uint64   `json:"enc"`
	Looping     bool             `json:"looping"`
	Duplicating bool             `json:"duplicating"`
	Gop         string           `json:"gop"`
	Debug       interface{}      `json:"debug"`
	Input       *RawAVstreamIo   `json:"input"`
	Output      *RawAVstreamIo   `json:"output"`
	Swap        *RawAVstreamSwap `json:"swap"`
}

func (*RawAVstream) UnmarshalPlayout

func (s *RawAVstream) UnmarshalPlayout(status playout.Status)

type RawAVstreamIo

type RawAVstreamIo struct {
	State  State          `json:"state"`
	Packet scalars.Uint64 `json:"packet"`
	Time   scalars.Uint64 `json:"time"`
	SizeKb scalars.Uint64 `json:"size_kb"`
}

func (*RawAVstreamIo) UnmarshalPlayout

func (i *RawAVstreamIo) UnmarshalPlayout(io playout.StatusIO)

type RawAVstreamSwap

type RawAVstreamSwap struct {
	URL       string `json:"url"`
	Status    string `json:"status"`
	Lasturl   string `json:"lasturl"`
	Lasterror string `json:"lasterror"`
}

func (*RawAVstreamSwap) UnmarshalPlayout

func (s *RawAVstreamSwap) UnmarshalPlayout(status playout.Status)

type State

type State string
const (
	StateRunning State = "RUNNING"
	StateIDLe    State = "IDLE"
)

func (State) IsValid

func (e State) IsValid() bool

func (State) MarshalGQL

func (e State) MarshalGQL(w io.Writer)

func (State) String

func (e State) String() string

func (*State) UnmarshalGQL

func (e *State) UnmarshalGQL(v interface{}) error

Jump to

Keyboard shortcuts

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