install

package
v0.0.0-...-363c35e Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrAlreadyLoggedError = errors.New("already logged error")
	ErrDependencyFailed   = errors.New("dependency failed")
)
View Source
var (
	// Set during build
	ContainerRegistry          string = ""
	ContainerRegistryDirectory string = ""
	ContainerImageTag          string = ""

	GetNormalizedContainerRegistryDirectory = sync.OnceValue(func() string {
		normalized := ContainerRegistryDirectory
		if !strings.HasPrefix(normalized, "/") {
			normalized = "/" + normalized
		}
		if !strings.HasSuffix(normalized, "/") {
			normalized = normalized + "/"
		}
		return normalized
	})
)

Functions

func ParseJsonLogs

func ParseJsonLogs(logs []byte) ([]map[string]any, error)

Types

type DatabaseVersion

type DatabaseVersion struct {
	Id          int    `json:"id"`
	Description string `json:"description"`
	State       string `json:"state"`
}

type Installer

type Installer interface {
	QuickValidateConfig() bool

	InstallTyger(ctx context.Context) error
	UninstallTyger(ctx context.Context, deleteData bool, preserveRunContainers bool) error

	ListDatabaseVersions(ctx context.Context, all bool) ([]DatabaseVersion, error)
	ApplyMigrations(ctx context.Context, targetVersion int, latest bool, offline bool, wait bool) error
	GetMigrationLogs(ctx context.Context, id int, destination io.Writer) error
}

type Promise

type Promise[T any] struct {
	// contains filtered or unexported fields
}

func NewPromise

func NewPromise[T any](ctx context.Context, group *PromiseGroup, function func(context.Context) (T, error)) *Promise[T]

func NewPromiseAfter

func NewPromiseAfter[T any](ctx context.Context, group *PromiseGroup, function func(context.Context) (T, error), dependencies ...UntypedPromise) *Promise[T]

func (*Promise[T]) Await

func (p *Promise[T]) Await() (T, error)

func (*Promise[T]) AwaitErr

func (p *Promise[T]) AwaitErr() error

type PromiseGroup

type PromiseGroup []UntypedPromise

type UntypedPromise

type UntypedPromise interface {
	AwaitErr() error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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