config

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const DAEMON_DB_PATH = "/var/lib/ravel/daemon.db"
View Source
const LOGS_DIRECTORY = "/var/log/ravel"

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentConfig

type AgentConfig struct {
	Region        string    `json:"region"`
	Address       string    `json:"address"`
	InitBinary    string    `json:"init_binary"`
	LinuxKernel   string    `json:"linux_kernel"`
	LogsDirectory string    `json:"logs_directory"`
	DatabasePath  string    `json:"database_path"`
	Resources     Resources `json:"resources"`
}

func (AgentConfig) Validate

func (dc AgentConfig) Validate() error

type ApiConfig

type ApiConfig struct {
	Address string `json:"address"`
}

type MachineResourcesTemplates

type MachineResourcesTemplates struct {
	FrequencyByCpu int           `json:"frequency_by_cpu"` // Frequency allocated in MHz
	Combinations   []VCpusMemory `json:"combinations"`
}

type NatsConfig

type NatsConfig struct {
	Url      string `json:"url"`
	CredFile string `json:"cred_file"`
}

func (NatsConfig) Validate

func (n NatsConfig) Validate() error

type RavelConfig

type RavelConfig struct {
	RavelApi         ApiConfig                            `json:"ravel_api"`
	NodeId           string                               `json:"node_id"`
	Agent            AgentConfig                          `json:"agent"`
	Corrosion        corroclient.Config                   `json:"corrosion"`
	PostgresURL      string                               `json:"postgres_url"`
	MachineTemplates map[string]MachineResourcesTemplates `json:"machine_templates"`
	Nats             NatsConfig                           `json:"nats"`
}

func ReadFile

func ReadFile(path string) (RavelConfig, error)

type Resources

type Resources = core.Resources

type VCpusMemory

type VCpusMemory struct {
	VCpus         int   `json:"vcpus"`
	MemoryConfigs []int `json:"memory_configs"`
}

Jump to

Keyboard shortcuts

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