config

package
v0.0.0-...-37f5ccb Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildConfig

type BuildConfig struct {
	BuildEnabled       bool   `json:"build_enabled,omitempty"`
	BuilderImage       string `json:"builder_image,omitempty"`
	BuildkitdAddress   string `json:"buildkitd_address,omitempty"`
	BuildCtlBin        string `json:"build_ctl_bin,omitempty"`
	BuildRegistry      string `json:"build_registry,omitempty"`
	BuildRegistryToken string `json:"build_registry_token,omitempty"`
}

type Config

type Config struct {
	Server     ServerConfig    `json:"server,omitempty"`
	KubeConfig KubeConfig      `json:"kube_config,omitempty"`
	Ingress    IngressConfig   `json:"ingress,omitempty"`
	Inference  InferenceConfig `json:"inference,omitempty"`
	Build      BuildConfig     `json:"build,omitempty"`
	Metrics    MetricsConfig   `json:"metrics,omitempty"`
	Logs       LogsConfig      `json:"logs,omitempty"`
	DB         PostgresConfig  `json:"db,omitempty"`
}

func New

func New() Config

func (Config) GetString

func (c Config) GetString() (string, error)

func (Config) Validate

func (c Config) Validate() error

type InferenceConfig

type InferenceConfig struct {
	LogTimeout time.Duration `json:"log_timeout,omitempty"`
	CacheTTL   time.Duration `json:"cache_ttl,omitempty"`
}

type IngressConfig

type IngressConfig struct {
	IngressEnabled bool   `json:"ingress_enabled,omitempty"`
	Domain         string `json:"domain,omitempty"`
	Namespace      string `json:"namespace,omitempty"`
	AnyIPToDomain  bool   `json:"any_ip_to_domain,omitempty"`
}

type KubeConfig

type KubeConfig struct {
	Kubeconfig   string        `json:"kubeconfig,omitempty"`
	MasterURL    string        `json:"master_url,omitempty"`
	QPS          int           `json:"qps,omitempty"`
	Burst        int           `json:"burst,omitempty"`
	ResyncPeriod time.Duration `json:"resync_period,omitempty"`
}

type LogsConfig

type LogsConfig struct {
	Timeout   time.Duration `json:"timeout,omitempty"`
	LokiURL   string        `json:"loki_url,omitempty"`
	LokiUser  string        `json:"loki_user,omitempty"`
	LokiToken string        `json:"loki_token,omitempty"`
}

type MetricsConfig

type MetricsConfig struct {
	PollingInterval time.Duration `json:"polling_interval,omitempty"`
	ServerPort      int           `json:"server_port,omitempty"`
	PrometheusPort  int           `json:"prometheus_port,omitempty"`
	PrometheusHost  string        `json:"prometheus_host,omitempty"`
}

type PostgresConfig

type PostgresConfig struct {
	EventEnabled bool   `json:"event_enabled,omitempty"`
	URL          string `json:"url,omitempty"`
}

type ServerConfig

type ServerConfig struct {
	Dev          bool          `json:"dev,omitempty"`
	ServerPort   int           `json:"server_port,omitempty"`
	ReadTimeout  time.Duration `json:"read_timeout,omitempty"`
	WriteTimeout time.Duration `json:"write_timeout,omitempty"`
}

Jump to

Keyboard shortcuts

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