configs

package
v0.3.1-alpha Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init() error

Init - Assign global config to decoded config struct

func ValidateConfig

func ValidateConfig(cfg *AppConfig) error

ValidateConfig is for custom validation rules for the configuration

Types

type AppConfig

type AppConfig struct {
	Server       ServerConfig
	Database     DatabaseConfig
	TritonServer TritonServerConfig
}

AppConfig defines

var Config AppConfig

Config - Global variable to export

type DatabaseConfig

type DatabaseConfig struct {
	Username string
	Password string
	Host     string
	Port     int
	Name     string
	Version  uint
	TimeZone string
	Pool     struct {
		IdleConnections int
		MaxConnections  int
		ConnLifeTime    time.Duration
	}
}

Configs related to database

type ServerConfig

type ServerConfig struct {
	Port int
	HTTP struct {
		Enabled bool
		Port    int
	}
	HTTPS struct {
		Enabled bool
		Port    int
		Cert    string
		Key     string
	}
	CORSOrigins []string
}

ServerConfig defines HTTP server configurations

type TritonServerConfig

type TritonServerConfig struct {
	GrpcUri    string
	ModelStore string
}

Jump to

Keyboard shortcuts

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