types

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2026 License: MIT Imports: 11 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 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"`
	Runtime string `yaml:"runtime" default:"docker"`

	Auth   coretypes.AuthConfig `yaml:"auth"`
	Docker DockerConfig
	Yavirt YavirtConfig

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

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

func (*Config) GetHealthCheckStatusTTL

func (config *Config) GetHealthCheckStatusTTL() int64

GetHealthCheckStatusTTL returns 0: selfmon lives in eru-core, so core owns the ttl.

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 DockerConfig

type DockerConfig struct {
	Endpoint string `yaml:"endpoint" required:"false"`
}

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 Node

type Node struct {
	Name      string
	Endpoint  string
	Podname   string
	Labels    map[string]string
	Available bool
}

type NodeStatus

type NodeStatus struct {
	Nodename string
	Podname  string
	Alive    bool
	Error    error
}

type WorkloadEventMessage

type WorkloadEventMessage struct {
	ID       string
	Type     string
	Action   string
	TimeNano int64
}

type WorkloadStatus

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

type YavirtConfig

type YavirtConfig struct {
	Endpoint               string   `yaml:"endpoint" required:"false"`
	SkipGuestReportRegexps []string `yaml:"skip_guest_report_regexps" required:"false"`
}

Jump to

Keyboard shortcuts

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