config

package
v0.0.0-...-def24e1 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ResourceBackendTypeDocker = "docker"
	ResourceBackendTypeK8s    = "k8s"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiConfig

type ApiConfig struct {
	Host      string
	Port      int
	Version   string
	UrlPrefix string `json:"url_prefix"`
}

func (ApiConfig) GetAddr

func (api ApiConfig) GetAddr() string

type DetectorConfig

type DetectorConfig struct {
	Prom           PromConfig `json:"prom"`
	Api            ApiConfig  `json:"api"`
	DetectInterval int64      `json:"detect_interval"`
}

type DockerConfig

type DockerConfig struct {
}

type EConfig

type EConfig struct {
	Docker          DockerConfig
	Detector        DetectorConfig
	Scaler          ScalerConfig
	Zmq             ZmqConfig
	Redis           RedisConfig
	Logger          LoggerConfig
	K8s             K8sConfig
	Serving         ServingConfig         `json:"serving"`
	EnovaAlgo       EnovaAlgoConfig       `json:"enova_algo"`
	ResourceBackend ResourceBackendConfig `json:"resource_backend"`
}

func GetEConfig

func GetEConfig() *EConfig

func (*EConfig) DynamicUpdateConfig

func (c *EConfig) DynamicUpdateConfig(reflectValue *reflect.Value, allFields []reflect.StructField, envPrefix string)

func (*EConfig) Init

func (c *EConfig) Init(configPath string) error

func (*EConfig) PrintConfig

func (c *EConfig) PrintConfig()

type EnovaAlgoConfig

type EnovaAlgoConfig struct {
	Host string
}

type EnovaInferConfig

type EnovaInferConfig struct {
	ExecutionControl          TritonInferConfig
	PerformanceDetection      TritonInferConfig
	ApplicationDomainAdaption TritonInferConfig
}

type K8sConfig

type K8sConfig struct {
	InCluster      bool   `json:"in_cluster"`
	KubeConfigPath string `json:"kube_config_path"`
}

type LoggerConfig

type LoggerConfig struct {
	Level string
	Name  string
	Path  string
}

type PromConfig

type PromConfig struct {
	Host string
	Port int
}

type RedisConfig

type RedisConfig struct {
	Addr     string
	Password string
	Db       int
}

type ResourceBackendConfig

type ResourceBackendConfig struct {
	Type ResourceBackendType
}

type ResourceBackendType

type ResourceBackendType string

type ScalerConfig

type ScalerConfig struct {
}

type ServingConfig

type ServingConfig struct {
	Image        string   `json:"image"`
	StartCmd     []string `json:"start_cmd"`
	Network      string   `json:"network"`
	NetworkAlias string   `json:"network_alias"`
	Name         string   `json:"name"`
}

type TritonInferConfig

type TritonInferConfig struct {
	Host      string
	Port      int
	ModelName string
}

func (TritonInferConfig) GetUrl

func (e TritonInferConfig) GetUrl() string

type ZmqConfig

type ZmqConfig struct {
	Host string
	Port int
}

Jump to

Keyboard shortcuts

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