docker

package
v0.0.0-...-4d12b9b Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2026 License: AGPL-3.0 Imports: 15 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Integrations = []string{
	"aws",
	"azure",
	"bitdefender",
	"crowdstrike",
	"gcp",
	"o365",
	"o365_graph",
	"sophos",
}

Integrations are the pullers, one container each, built from integrations/<name>.

View Source
var (
	Services = []system.ServiceConfig{}
)

Functions

func DetectOpenSearch

func DetectOpenSearch() (bool, error)

DetectOpenSearch reports whether a running container with an opensearch image exists

func DetectOpenSearchInfo

func DetectOpenSearchInfo() (*osSecondaryInfo, error)

DetectOpenSearchInfo returns the detected container's service name and admin password (env OPENSEARCH_INITIAL_ADMIN_PASSWORD, user always "admin"), so the stack can keep running opensearch on update instead of pruning it.

func EnsureStorageConfig

func EnsureStorageConfig(conf *config.Config, withOpenSearchSecondary bool) error

func InitSwarm

func InitSwarm(mainIP string) error

func InstallDocker

func InstallDocker(distro string) error

func PostInstallation

func PostInstallation() error

func RecalculateMemory

func RecalculateMemory() error

func SetPluginsConfigs

func SetPluginsConfigs(conf *config.Config, stack *StackConfig) error

func StackUP

func StackUP(tag string) error

Types

type ClickHouseConfig

type ClickHouseConfig struct {
	Host     string `yaml:"host"`
	Port     string `yaml:"port"`
	Database string `yaml:"database"`
	User     string `yaml:"user"`
	Password string `yaml:"password"`

	LogsTable       string `yaml:"logsTable"`
	AlertsTable     string `yaml:"alertsTable"`
	StatisticsTable string `yaml:"statisticsTable"`
}

type ClickHousePluginsConfig

type ClickHousePluginsConfig struct {
	Plugins map[string]ClickHouseConfig `yaml:"plugins"`
}

type Compose

type Compose struct {
	Volumes  map[string]Volume  `yaml:"volumes,omitempty"`
	Services map[string]Service `yaml:"services,omitempty"`
}

func (*Compose) Encode

func (c *Compose) Encode() ([]byte, error)

func (*Compose) Populate

func (c *Compose) Populate(conf *config.Config, stack *StackConfig) error

type Deploy

type Deploy struct {
	Mode           *string           `yaml:"mode,omitempty"`
	Replicas       *int              `yaml:"replicas,omitempty"`
	EndpointMode   *string           `yaml:"endpoint_mode,omitempty"`
	Labels         map[string]string `yaml:"labels,omitempty"`
	Placement      *Placement        `yaml:"placement,omitempty"`
	Resources      *Resources        `yaml:"resources,omitempty"`
	RestartPolicy  *RestartPolicy    `yaml:"restart_policy,omitempty"`
	RollbackConfig *RUConfig         `yaml:"rollback_config,omitempty"`
	UpdateConfig   *RUConfig         `yaml:"update_config,omitempty"`
}

type FieldMap

type FieldMap = map[string]map[string]any

type Logging

type Logging struct {
	Driver  *string        `yaml:"driver,omitempty"`
	Options map[string]any `yaml:"options,omitempty"`
}

type Placement

type Placement struct {
	Constraints []string          `yaml:"constraints,omitempty"`
	Preferences map[string]string `yaml:"preferences,omitempty"`
}

type PluginConfig

type PluginConfig struct {
	Order         []string      `yaml:"order,omitempty"`
	Port          int           `yaml:"port,omitempty"`
	PostgreSQL    PostgreConfig `yaml:"postgresql,omitempty"`
	InternalKey   string        `yaml:"internalKey,omitempty"`
	EncryptionKey string        `yaml:"encryptionKey,omitempty"`
	Env           string        `yaml:"env,omitempty"`
	AgentManager  string        `yaml:"agentManager,omitempty"`
	Backend       string        `yaml:"backend,omitempty"`
	CertsFolder   string        `yaml:"certsFolder,omitempty"`
	Valkey        ValkeyConfig  `yaml:"valkey,omitempty"`
}

type PluginsConfig

type PluginsConfig struct {
	Plugins map[string]PluginConfig `yaml:"plugins"`
}

type PostgreConfig

type PostgreConfig struct {
	Server   string `yaml:"server"`
	Port     string `yaml:"port"`
	User     string `yaml:"user"`
	Password string `yaml:"password"`
	Database string `yaml:"database"`
}

type RUConfig

type RUConfig struct {
	Parallelism     *int     `yaml:"parallelism,omitempty"`
	Delay           *string  `yaml:"delay,omitempty"`
	FailureAction   *string  `yaml:"failure_action,omitempty"`
	Monitor         *string  `yaml:"monitor,omitempty"`
	MaxFailureRatio *float64 `yaml:"max_failure_ratio,omitempty"`
	Order           *string  `yaml:"order,omitempty"`
}

type Res

type Res struct {
	CPUs    *string          `yaml:"cpus,omitempty"`
	Memory  *string          `yaml:"memory,omitempty"`
	Devices []map[string]any `yaml:"devices,omitempty"`
}

type Resources

type Resources struct {
	Limits       *Res `yaml:"limits,omitempty"`
	Reservations *Res `yaml:"reservations,omitempty"`
}

type RestartPolicy

type RestartPolicy struct {
	Condition   *string `yaml:"condition,omitempty"`
	Delay       *string `yaml:"delay,omitempty"`
	MaxAttempts *int    `yaml:"max_attempts,omitempty"`
	Window      *string `yaml:"window,omitempty"`
}

type Service

type Service struct {
	Image       *string  `yaml:"image,omitempty"`
	Volumes     []string `yaml:"volumes,omitempty"`
	Ports       []string `yaml:"ports,omitempty"`
	Environment []string `yaml:"environment,omitempty"`
	DependsOn   []string `yaml:"depends_on,omitempty"`
	Logging     *Logging `yaml:"logging,omitempty"`
	Deploy      *Deploy  `yaml:"deploy,omitempty"`
	Command     []string `yaml:"command,omitempty,flow"`
}

type StackConfig

type StackConfig struct {
	FrontEndNginx         string
	ServiceResources      map[string]*system.ServiceConfig
	Threads               int
	ClickHouseData        string
	ClickHouseSchema      string
	ClickHouseConf        string
	ClickHouseConfigD     string
	ClickHouseCold        string
	NATSData              string
	ValkeyData            string
	ESData                string
	ESBackups             string
	OpenSearchEnabled     bool
	OpenSearchServiceName string
	Cert                  string
	EventsEngineWorkdir   string
	LocksDir              string
	ShmFolder             string
}

func GetStackConfig

func GetStackConfig() *StackConfig

func (*StackConfig) ApplyMemory

func (s *StackConfig) ApplyMemory() (map[string]*system.ServiceConfig, error)

ApplyMemory loads and validates the persisted allocation, then applies it to this stack config. It never rewrites the file, so admin edits survive this call and the next update.

type StorageEngine

type StorageEngine struct {
	Engine     string     `yaml:"engine"`
	ClickHouse *storageCH `yaml:"clickhouse,omitempty"`
	OpenSearch *storageOS `yaml:"opensearch,omitempty"`
}

type ValkeyConfig

type ValkeyConfig struct {
	Addr     string `yaml:"addr,omitempty"`
	Password string `yaml:"password,omitempty"`
}

type Volume

type Volume map[string]any

Jump to

Keyboard shortcuts

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