config

package
v0.0.0-...-2a3f13b Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2019 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RoleShovel            = "shovel"
	RoleCompute           = "compute"
	LogLevelDebug         = "debug"
	LogLevelInfo          = "info"
	LogLevelWarn          = "warn"
	LogLevelError         = "error"
	LogLevelFatal         = "fatal"
	LogFormatterText      = "text"
	LogFormatterJson      = "json"
	ApiFfmpegDebugNone    = "none"
	ApiFfmpegDebugLog     = "to-log"
	ApiFfmpegDebugOut     = "to-out"
	ApiFfmpegProtocolUnix = "unix"
)

Variables

This section is empty.

Functions

func ConfigureLogging

func ConfigureLogging()

func ConvertToChannelConfig

func ConvertToChannelConfig(cfg ChannelMap) *messaging.ChannelConfig

func LoadConfig

func LoadConfig() error

func SaveConfigIfRequested

func SaveConfigIfRequested()

func SetupFlags

func SetupFlags()

Types

type ApiMap

type ApiMap struct {
	Ffmpeg FfmpegMap
	Http   HttpMap
}

type ChannelMap

type ChannelMap struct {
	Queue    messaging.QueueOptions
	Exchange messaging.ExchangeOptions
	Qos      messaging.QosOptions
}

type ChannelsCollection

type ChannelsCollection struct {
	Task  TaskMap
	Slice SliceMap
}

type ConfigMap

type ConfigMap struct {
	Log        LogMap
	RabbitMq   RabbitMqMap
	Api        ApiMap
	Input      InputMap
	Output     OutputMap
	Prometheus PrometheusMap
	Role       string
}

func CreateDefaultConfig

func CreateDefaultConfig() ConfigMap

func GetConfig

func GetConfig() ConfigMap

type FfmpegMap

type FfmpegMap struct {
	DefaultArgs []string
	Protocol    string
	Unix        string
	SplitArgs   []string
	MergeArgs   []string
	Debug       string
}

type HttpMap

type HttpMap struct {
	Address      string
	LivenessUri  string
	ReadinessUri string
}

type InputMap

type InputMap struct {
	Dir string
}

type LogMap

type LogMap struct {
	Level      string
	Timestamps bool
	Formatter  string
	Caller     bool
}

type OutputMap

type OutputMap struct {
	Dir    string
	TmpDir string
}

type PrometheusMap

type PrometheusMap struct {
	Enabled bool
	Uri     string
}

type RabbitMqMap

type RabbitMqMap struct {
	Url      string
	Channels ChannelsCollection
}

type SliceMap

type SliceMap struct {
	Added     ChannelMap
	Completed ChannelMap
}

type TaskMap

type TaskMap struct {
	Added     ChannelMap
	Completed ChannelMap
	Cancelled ChannelMap
}

Jump to

Keyboard shortcuts

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