config

package
v2.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AmiConfig

type AmiConfig struct {
	Kube   KubeConfig   `yaml:"kube" json:"kube"`
	Native NativeConfig `yaml:"native" json:"native"`
}

type Attribute

type Attribute struct {
	Name  string `yaml:"name" json:"name" validate:"nonzero"`
	Label string `yaml:"label" json:"label" validate:"nonzero"`
	Value string `yaml:"value" json:"value"`
	Desc  string `yaml:"description" json:"description"`
}

Attribute field to be filled

type Config

type Config struct {
	Node     utils.Certificate `yaml:"node" json:"node"`
	Engine   EngineConfig      `yaml:"engine" json:"engine"`
	AMI      AmiConfig         `yaml:",inline" json:",inline"`
	Sync     SyncConfig        `yaml:"sync" json:"sync"`
	Store    StoreConfig       `yaml:"store" json:"store"`
	Event    EventConfig       `yaml:"event" json:"event"`
	Init     InitConfig        `yaml:"init" json:"init"`
	Security SecurityConfig    `yaml:"security" json:"security"`
	Server   http.ServerConfig `yaml:"server" json:"server"`
	Logger   log.Config        `yaml:"logger" json:"logger"`
	Plugin   struct {
		Link   string `yaml:"link" json:"link" default:"httplink"`
		Pubsub string `yaml:"pubsub" json:"pubsub" default:"defaultpubsub"`
	} `yaml:"plugin" json:"plugin"`
}

Config the core config

type EngineConfig

type EngineConfig struct {
	Report struct {
		Interval time.Duration `yaml:"interval" json:"interval" default:"10s"`
	} `yaml:"report" json:"report"`
}

type EventConfig added in v2.1.1

type EventConfig struct {
	Notify  bool    `yaml:"notify" json:"notify"`
	Publish Publish `yaml:"publish" json:"publish"`
}

type Fingerprint

type Fingerprint struct {
	Proof Proof  `yaml:"proof" json:"proof"`
	Value string `yaml:"value" json:"value"`
}

Fingerprint type to be collected

type InitConfig

type InitConfig struct {
	Batch struct {
		Name         string `yaml:"name" json:"name"`
		Namespace    string `yaml:"namespace" json:"namespace"`
		SecurityType string `yaml:"securityType" json:"securityType"`
		SecurityKey  string `yaml:"securityKey" json:"securityKey"`
	} `yaml:"batch" json:"batch"`
	Active struct {
		http.ClientConfig `yaml:",inline" json:",inline"`
		URL               string        `yaml:"url" json:"url" default:"/v1/active"`
		Interval          time.Duration `yaml:"interval" json:"interval" default:"45s"`
		Collector         struct {
			Fingerprints []Fingerprint `yaml:"fingerprints" json:"fingerprints"`
			Attributes   []Attribute   `yaml:"attributes" json:"attributes"`
			Server       Server        `yaml:"server" json:"server"`
		} `yaml:"collector" json:"collector"`
	} `yaml:"active" json:"active"`
}

type KubeConfig

type KubeConfig struct {
	OutCluster bool                `yaml:"outCluster" json:"outCluster"`
	ConfPath   string              `yaml:"confPath" json:"confPath"`
	LogConfig  KubernetesLogConfig `yaml:"logConfig" json:"logConfig"` // TODO: remove
}

type KubernetesLogConfig

type KubernetesLogConfig struct {
	Follow     bool `yaml:"follow" json:"follow"`
	Previous   bool `yaml:"previous" json:"previous"`
	TimeStamps bool `yaml:"timestamps" json:"timestamps"`
}

TODO: remove

type NativeConfig

type NativeConfig struct {
	PortsRange PortsRange `yaml:"portsRange" json:"portsRange"`
}

type PKIConfig

type PKIConfig struct {
	SubDuration  time.Duration `yaml:"subDuration" json:"subDuration" default:"175200h"`   // 20*365*24
	RootDuration time.Duration `yaml:"rootDuration" json:"rootDuration" default:"438000h"` // 50*365*24
}

type PortsRange

type PortsRange struct {
	Start int `yaml:"start" json:"start" default:"50200"`
	End   int `yaml:"end" json:"end" default:"51000"`
}

type Proof

type Proof string

Proof the proof of fingerprints

const (
	ProofSN         Proof = "sn"
	ProofInput      Proof = "input"
	ProofHostName   Proof = "hostName"
	ProofBootID     Proof = "bootID"
	ProofMachineID  Proof = "machineID"
	ProofSystemUUID Proof = "systemUUID"
)

all proofs

type Publish added in v2.1.1

type Publish struct {
	QOS   byte   `yaml:"qos" json:"qos" validate:"min=0, max=1"`
	Topic string `yaml:"topic" json:"topic" default:"$baetyl/node/props" validate:"nonzero"`
}

type SecurityConfig

type SecurityConfig struct {
	Kind      string    `yaml:"kind" json:"kind" default:"pki"`
	PKIConfig PKIConfig `yaml:"pki" json:"pki"`
}

type Server

type Server struct {
	Listen string `yaml:"listen" json:"listen"`
	Pages  string `yaml:"pages" json:"pages" default:"etc/baetyl/pages"`
}

Server manually activated server configuration

type StoreConfig

type StoreConfig struct {
	Path string `yaml:"path" json:"path" default:"var/lib/baetyl/store/core.db"`
}

type SyncConfig

type SyncConfig struct {
	Report struct {
		Interval time.Duration `yaml:"interval" json:"interval" default:"20s"`
	} `yaml:"report" json:"report"`
	Download struct {
		Path              string `yaml:"path" json:"path" default:"var/lib/baetyl/object"`
		http.ClientConfig `yaml:",inline" json:",inline"`
	} `yaml:"download" json:"download"`
}

Jump to

Keyboard shortcuts

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