docker

package
v0.0.0-...-5f17d81 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2025 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

func InitSwarm

func InitSwarm(mainIP string) error

func InstallDocker

func InstallDocker(distro string) error

func PostInstallation

func PostInstallation() error

func RemoveServices

func RemoveServices(services []string) error

func SetPluginsConfigs

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

func StackUP

func StackUP(tag string) error

Types

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 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"`
	RulesFolder   string        `yaml:"rulesFolder,omitempty"`
	GeoIPFolder   string        `yaml:"geoipFolder,omitempty"`
	OpenSearch    string        `yaml:"opensearch,omitempty"`
	PostgreSQL    PostgreConfig `yaml:"postgresql,omitempty"`
	ServerName    string        `yaml:"serverName,omitempty"`
	InternalKey   string        `yaml:"internalKey,omitempty"`
	AgentManager  string        `yaml:"agentManager,omitempty"`
	Backend       string        `yaml:"backend,omitempty"`
	CertsFolder   string        `yaml:"certsFolder,omitempty"`
	ModulesConfig string        `yaml:"modulesConfig,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
	ESData              string
	ESBackups           string
	Cert                string
	DataSources         string
	EventsEngineWorkdir string
	LocksDir            string
	ShmFolder           string
}

func GetStackConfig

func GetStackConfig() *StackConfig

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