{"modulePath":"github.com/utmstack/UTMStack/installer","version":"v0.0.0-20261203180808-4d12b9be42b1","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package docker\n\n## Variables\n\n```go\nvar Integrations = []string{\n\t\"aws\",\n\t\"azure\",\n\t\"bitdefender\",\n\t\"crowdstrike\",\n\t\"gcp\",\n\t\"o365\",\n\t\"o365_graph\",\n\t\"sophos\",\n}\n```\nIntegrations are the pullers, one container each, built from integrations/\\\u003cname\u003e.\n\n```go\nvar (\n\tServices = []system.ServiceConfig{}\n)\n```\n\n## Functions\n\n```go\nfunc DetectOpenSearch() (bool, error)\n```\nDetectOpenSearch reports whether a running container with an opensearch image exists\n\n```go\nfunc DetectOpenSearchInfo() (*osSecondaryInfo, error)\n```\nDetectOpenSearchInfo 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.\n\n```go\nfunc EnsureStorageConfig(conf *config.Config, withOpenSearchSecondary bool) error\n```\n\n```go\nfunc InitSwarm(mainIP string) error\n```\n\n```go\nfunc InstallDocker(distro string) error\n```\n\n```go\nfunc PostInstallation() error\n```\n\n```go\nfunc RecalculateMemory() error\n```\n\n```go\nfunc SetPluginsConfigs(conf *config.Config, stack *StackConfig) error\n```\n\n```go\nfunc StackUP(tag string) error\n```\n\n## Types\n\n```go\ntype ClickHouseConfig struct {\n\tHost     string `yaml:\"host\"`\n\tPort     string `yaml:\"port\"`\n\tDatabase string `yaml:\"database\"`\n\tUser     string `yaml:\"user\"`\n\tPassword string `yaml:\"password\"`\n\n\tLogsTable       string `yaml:\"logsTable\"`\n\tAlertsTable     string `yaml:\"alertsTable\"`\n\tStatisticsTable string `yaml:\"statisticsTable\"`\n}\n```\n\n```go\ntype ClickHousePluginsConfig struct {\n\tPlugins map[string]ClickHouseConfig `yaml:\"plugins\"`\n}\n```\n\n```go\ntype Compose struct {\n\tVolumes  map[string]Volume  `yaml:\"volumes,omitempty\"`\n\tServices map[string]Service `yaml:\"services,omitempty\"`\n}\n```\n\n```go\nfunc (c *Compose) Encode() ([]byte, error)\n```\n\n```go\nfunc (c *Compose) Populate(conf *config.Config, stack *StackConfig) error\n```\n\n```go\ntype Deploy struct {\n\tMode           *string           `yaml:\"mode,omitempty\"`\n\tReplicas       *int              `yaml:\"replicas,omitempty\"`\n\tEndpointMode   *string           `yaml:\"endpoint_mode,omitempty\"`\n\tLabels         map[string]string `yaml:\"labels,omitempty\"`\n\tPlacement      *Placement        `yaml:\"placement,omitempty\"`\n\tResources      *Resources        `yaml:\"resources,omitempty\"`\n\tRestartPolicy  *RestartPolicy    `yaml:\"restart_policy,omitempty\"`\n\tRollbackConfig *RUConfig         `yaml:\"rollback_config,omitempty\"`\n\tUpdateConfig   *RUConfig         `yaml:\"update_config,omitempty\"`\n}\n```\n\n```go\ntype FieldMap = map[string]map[string]any\n```\n\n```go\ntype Logging struct {\n\tDriver  *string        `yaml:\"driver,omitempty\"`\n\tOptions map[string]any `yaml:\"options,omitempty\"`\n}\n```\n\n```go\ntype Placement struct {\n\tConstraints []string          `yaml:\"constraints,omitempty\"`\n\tPreferences map[string]string `yaml:\"preferences,omitempty\"`\n}\n```\n\n```go\ntype PluginConfig struct {\n\tOrder         []string      `yaml:\"order,omitempty\"`\n\tPort          int           `yaml:\"port,omitempty\"`\n\tPostgreSQL    PostgreConfig `yaml:\"postgresql,omitempty\"`\n\tInternalKey   string        `yaml:\"internalKey,omitempty\"`\n\tEncryptionKey string        `yaml:\"encryptionKey,omitempty\"`\n\tEnv           string        `yaml:\"env,omitempty\"`\n\tAgentManager  string        `yaml:\"agentManager,omitempty\"`\n\tBackend       string        `yaml:\"backend,omitempty\"`\n\tCertsFolder   string        `yaml:\"certsFolder,omitempty\"`\n\tValkey        ValkeyConfig  `yaml:\"valkey,omitempty\"`\n}\n```\n\n```go\ntype PluginsConfig struct {\n\tPlugins map[string]PluginConfig `yaml:\"plugins\"`\n}\n```\n\n```go\ntype PostgreConfig struct {\n\tServer   string `yaml:\"server\"`\n\tPort     string `yaml:\"port\"`\n\tUser     string `yaml:\"user\"`\n\tPassword string `yaml:\"password\"`\n\tDatabase string `yaml:\"database\"`\n}\n```\n\n```go\ntype RUConfig struct {\n\tParallelism     *int     `yaml:\"parallelism,omitempty\"`\n\tDelay           *string  `yaml:\"delay,omitempty\"`\n\tFailureAction   *string  `yaml:\"failure_action,omitempty\"`\n\tMonitor         *string  `yaml:\"monitor,omitempty\"`\n\tMaxFailureRatio *float64 `yaml:\"max_failure_ratio,omitempty\"`\n\tOrder           *string  `yaml:\"order,omitempty\"`\n}\n```\n\n```go\ntype Res struct {\n\tCPUs    *string          `yaml:\"cpus,omitempty\"`\n\tMemory  *string          `yaml:\"memory,omitempty\"`\n\tDevices []map[string]any `yaml:\"devices,omitempty\"`\n}\n```\n\n```go\ntype Resources struct {\n\tLimits       *Res `yaml:\"limits,omitempty\"`\n\tReservations *Res `yaml:\"reservations,omitempty\"`\n}\n```\n\n```go\ntype RestartPolicy struct {\n\tCondition   *string `yaml:\"condition,omitempty\"`\n\tDelay       *string `yaml:\"delay,omitempty\"`\n\tMaxAttempts *int    `yaml:\"max_attempts,omitempty\"`\n\tWindow      *string `yaml:\"window,omitempty\"`\n}\n```\n\n```go\ntype Service struct {\n\tImage       *string  `yaml:\"image,omitempty\"`\n\tVolumes     []string `yaml:\"volumes,omitempty\"`\n\tPorts       []string `yaml:\"ports,omitempty\"`\n\tEnvironment []string `yaml:\"environment,omitempty\"`\n\tDependsOn   []string `yaml:\"depends_on,omitempty\"`\n\tLogging     *Logging `yaml:\"logging,omitempty\"`\n\tDeploy      *Deploy  `yaml:\"deploy,omitempty\"`\n\tCommand     []string `yaml:\"command,omitempty,flow\"`\n}\n```\n\n```go\ntype StackConfig struct {\n\tFrontEndNginx         string\n\tServiceResources      map[string]*system.ServiceConfig\n\tThreads               int\n\tClickHouseData        string\n\tClickHouseSchema      string\n\tClickHouseConf        string\n\tClickHouseConfigD     string\n\tClickHouseCold        string\n\tNATSData              string\n\tValkeyData            string\n\tESData                string\n\tESBackups             string\n\tOpenSearchEnabled     bool\n\tOpenSearchServiceName string\n\tCert                  string\n\tEventsEngineWorkdir   string\n\tLocksDir              string\n\tShmFolder             string\n}\n```\n\n```go\nfunc GetStackConfig() *StackConfig\n```\n\n```go\nfunc (s *StackConfig) ApplyMemory() (map[string]*system.ServiceConfig, error)\n```\nApplyMemory 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.\n\n```go\ntype StorageEngine struct {\n\tEngine     string     `yaml:\"engine\"`\n\tClickHouse *storageCH `yaml:\"clickhouse,omitempty\"`\n\tOpenSearch *storageOS `yaml:\"opensearch,omitempty\"`\n}\n```\n\n```go\ntype ValkeyConfig struct {\n\tAddr     string `yaml:\"addr,omitempty\"`\n\tPassword string `yaml:\"password,omitempty\"`\n}\n```\n\n```go\ntype Volume map[string]any\n```\n\n","path":"github.com/utmstack/UTMStack/installer/docker","name":"docker","synopsis":"","isRedistributable":true}
