types

package
v0.0.0-...-b022d11 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2023 License: MIT Imports: 10 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"`
}

APIConfig contain api config

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"`
}

Config contain all configs

func (*Config) GetHealthCheckStatusTTL

func (config *Config) GetHealthCheckStatusTTL() int64

GetHealthCheckStatusTTL returns the TTL for health check status. Because selfmon is integrated in eru-core, so there returns 0.

func (*Config) Prepare

func (config *Config) Prepare(c *cli.Context)

Prepare 从 cli 覆写并做准备

func (*Config) Print

func (config *Config) Print()

Print config

type DockerConfig

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

DockerConfig contain docker endpoint

type HealthCheckConfig

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

HealthCheckConfig contain healthcheck config

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"`
}

Log for log

type LogConfig

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

LogConfig contain log config

type LogConsumer

type LogConsumer struct {
	ID   string
	App  string
	Conn net.Conn
	Buf  *bufio.ReadWriter
}

LogConsumer for log consumer

type MetricsConfig

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

MetricsConfig contain metrics config

type Node

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

Node .

type NodeStatus

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

NodeStatus .

type WorkloadEventMessage

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

WorkloadEventMessage .

type WorkloadStatus

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

WorkloadStatus .

type YavirtConfig

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

YavirtConfig contain yavirt endpoint

Jump to

Keyboard shortcuts

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