dockerinstall

package
v0.0.0-...-120320f Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2025 License: MIT Imports: 45 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConfigKindDocker = "docker"
)

Variables

View Source
var (
	NameRegex = regexp.MustCompile(`^[a-z][a-z\-0-9]{1,23}$`)

	DefaultEnvironmentName  = "local"
	DefaultInstallationPath = "/opt/tyger"
	DefaultPostgresImage    = "postgres:16.2"
	DefaultMarinerImage     = "mcr.microsoft.com/azurelinux/base/core:3.0"

	InstallationPathMaxLength = 70
)

Functions

func GenerateSigningKeyPair

func GenerateSigningKeyPair(publicPath, privatePath string) error

func PrettyPrintConfig

func PrettyPrintConfig(config *DockerEnvironmentConfig, writer io.Writer) error

func RenderConfig

func RenderConfig(templateValues ConfigTemplateValues, writer io.Writer) error

Types

type BuffersConfig

type BuffersConfig struct {
	ActiveLifetime      string `yaml:"activeLifetime"`
	SoftDeletedLifetime string `yaml:"softDeletedLifetime"`
}

type ConfigTemplateValues

type ConfigTemplateValues struct {
	PublicSigningKeyPath  string
	PrivateSigningKeyPath string
	DataPlanePort         int
}

type DataPlaneSigningKeys

type DataPlaneSigningKeys struct {
	Primary   *KeyPair `yaml:"primary"`
	Secondary *KeyPair `yaml:"secondary"`
}

type DockerEnvironmentConfig

type DockerEnvironmentConfig struct {
	install.ConfigFileCommon `yaml:",inline"`

	EnvironmentName string `yaml:"environmentName"`

	DataPlanePort int `yaml:"dataPlanePort"`

	UserId         string `yaml:"userId"`
	AllowedGroupId string `yaml:"allowedGroupId"`

	InstallationPath string `yaml:"installationPath"`

	PostgresImage      string `yaml:"postgresImage"`
	MarinerImage       string `yaml:"marinerImage"`
	ControlPlaneImage  string `yaml:"controlPlaneImage"`
	DataPlaneImage     string `yaml:"dataPlaneImage"`
	BufferSidecarImage string `yaml:"bufferSidecarImage"`
	GatewayImage       string `yaml:"gatewayImage"`

	UseGateway *bool `yaml:"useGateway"`

	SigningKeys DataPlaneSigningKeys `yaml:"signingKeys"`

	InitialDatabaseVersion *int `yaml:"initialDatabaseVersion"`

	Network *NetworkConfig `yaml:"network"`

	Buffers *BuffersConfig `yaml:"buffers"`
}

func (*DockerEnvironmentConfig) GetGroupIdInt

func (c *DockerEnvironmentConfig) GetGroupIdInt() int

func (*DockerEnvironmentConfig) GetUserIdInt

func (c *DockerEnvironmentConfig) GetUserIdInt() int

func (*DockerEnvironmentConfig) QuickValidateConfig

func (envConfig *DockerEnvironmentConfig) QuickValidateConfig(ctx context.Context) error

type Installer

type Installer struct {
	Config *DockerEnvironmentConfig
	// contains filtered or unexported fields
}

func NewInstaller

func NewInstaller(config *DockerEnvironmentConfig) (*Installer, error)

func (*Installer) ApplyMigrations

func (inst *Installer) ApplyMigrations(ctx context.Context, targetVersion int, latest, offline, waitForCompletion bool) error

func (*Installer) ApplyMultiOrgFilter

func (inst *Installer) ApplyMultiOrgFilter([]string) error

func (*Installer) ApplySingleOrgFilter

func (inst *Installer) ApplySingleOrgFilter(string) error

func (*Installer) GetConfig

func (inst *Installer) GetConfig() install.ValidatableConfig

func (*Installer) GetMigrationLogs

func (inst *Installer) GetMigrationLogs(ctx context.Context, id int, destination io.Writer) error

func (*Installer) GetServerLogs

func (inst *Installer) GetServerLogs(ctx context.Context, options install.ServerLogOptions) error

func (*Installer) InstallTyger

func (inst *Installer) InstallTyger(ctx context.Context) error

func (*Installer) ListDatabaseVersions

func (inst *Installer) ListDatabaseVersions(ctx context.Context, allVersions bool) ([]install.DatabaseVersion, error)

func (*Installer) UninstallTyger

func (inst *Installer) UninstallTyger(ctx context.Context, deleteData bool, preserveRunContainers bool) error

type KeyPair

type KeyPair struct {
	PublicKey  string `yaml:"public"`
	PrivateKey string `yaml:"private"`
}

type NetworkConfig

type NetworkConfig struct {
	Subnet string `yaml:"subnet"`
}

Jump to

Keyboard shortcuts

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