types

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2026 License: MIT Imports: 12 Imported by: 11

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIConfig

type APIConfig struct {
	Addr string `yaml:"addr"`
}

type CocoonConfig added in v0.1.1

type CocoonConfig struct {
	Socket string `yaml:"socket"`
}

CocoonConfig is defaulted in Prepare like ContainerdConfig; the daemon it points at is optional.

type Config

type Config struct {
	PidFile           string   `yaml:"pid" default:"/tmp/agent.pid"`
	Core              []string `yaml:"core" required:"true"`
	HostName          string   `yaml:"-"`
	HeartbeatInterval int      `yaml:"heartbeat_interval" default:"60"`

	CheckOnlyMine bool `yaml:"check_only_mine" default:"false"`

	Store    string `yaml:"store" default:"grpc"`
	MetaDir  string `yaml:"meta_dir" default:"/run/eru/workloads"`
	StateDir string `yaml:"state_dir" default:"/var/lib/eru-agent"`

	Auth     coretypes.AuthConfig `yaml:"auth"`
	Runtimes RuntimesConfig       `yaml:"runtimes"`

	Metrics     MetricsConfig
	API         APIConfig `yaml:"api"`
	Log         LogConfig
	HealthCheck HealthCheckConfig `yaml:"healthcheck"`

	GlobalConnectionTimeout time.Duration `yaml:"global_connection_timeout" default:"5s"`
}

func (*Config) Prepare

func (config *Config) Prepare(ctx context.Context, c *cli.Command)

Prepare overrides the loaded config with the command line flags.

func (*Config) Print

func (config *Config) Print(ctx context.Context)

type ContainerdConfig added in v0.1.1

type ContainerdConfig struct {
	Socket    string `yaml:"socket"`
	Namespace string `yaml:"namespace"`
}

ContainerdConfig is defaulted in Prepare: the walker cannot default a pointer the file allocates.

type HealthCheckConfig

type HealthCheckConfig struct {
	Interval int   `yaml:"interval" default:"60"`
	Timeout  int   `yaml:"timeout" default:"10"`
	CacheTTL int64 `yaml:"cache_ttl" default:"300"`
}

type Log

type Log struct {
	ID         string            `json:"id"`
	Name       string            `json:"name"`
	Type       string            `json:"type"`
	EntryPoint string            `json:"entrypoint"`
	Ident      string            `json:"ident"`
	Data       string            `json:"data"`
	Datetime   string            `json:"datetime"`
	Extra      map[string]string `json:"extra"`
}

type LogConfig

type LogConfig struct {
	Forwards []string `yaml:"forwards"`
	Stdout   bool     `yaml:"stdout"`
}

type MetricsConfig

type MetricsConfig struct {
	Step      int64    `yaml:"step" default:"10"`
	Transfers []string `yaml:"transfers"`
}

type MocksConfig added in v0.1.1

type MocksConfig struct{}

MocksConfig has no keys: the scripted runtime the test suite runs against.

type Node

type Node struct {
	Endpoint string
}

type NodeStatus

type NodeStatus struct {
	Nodename string
	Alive    bool
}

type RuntimesConfig added in v0.1.1

type RuntimesConfig struct {
	Containerd *ContainerdConfig `yaml:"containerd"`
	Systemd    *SystemdConfig    `yaml:"systemd"`
	Cocoon     *CocoonConfig     `yaml:"cocoon"`
	Mocks      *MocksConfig      `yaml:"mocks"`
}

RuntimesConfig lists the runtimes this node hosts; the heartbeat needs every one of them alive.

type SystemdConfig added in v0.1.1

type SystemdConfig struct{}

SystemdConfig has no keys: a process pod is described by its meta file, not by the runtime.

type WorkloadEventMessage

type WorkloadEventMessage struct {
	ID     string
	Action string
}

type WorkloadStatus

type WorkloadStatus struct {
	ID         string
	Running    bool
	Healthy    bool
	Networks   map[string]string
	Extension  []byte
	Appname    string
	Nodename   string
	Entrypoint string
}

Jump to

Keyboard shortcuts

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