app

package
v1.1.46 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2024 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Overview

Package app contains logic for global/cross-cutting Thelma dependencies, such as configuration, logging support, and API client factories

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	Runner      shell.Runner
	StateLoader terra.StateLoader
}

Options for a thelmaApp

type ThelmaApp

type ThelmaApp interface {
	// Clients convenience constructors for clients used in Thelma commands
	Clients() clients.Clients
	// Config returns configuration object for this ThelmaApp
	Config() config.Config
	// Credentials returns credential manager object for this ThelmaApp
	Credentials() credentials.Credentials
	// AutoUpdate returns the installer for this ThelmaApp
	AutoUpdate() autoupdate.AutoUpdate
	// Ops returns the Ops interface for this ThelmaApp
	Ops() ops.Ops
	// Paths returns Paths for this ThelmaApp
	Paths() paths.Paths
	// Scratch returns the Scratch instance for this ThelmaApp
	Scratch() scratch.Scratch
	// ShellRunner returns ShellRunner for this ThelmaApp
	ShellRunner() shell.Runner
	// State returns a new terra.State instance for this ThelmaApp
	State() (terra.State, error)
	// StateLoader returns the terra.StateLoader instance for this ThelmaApp
	StateLoader() (terra.StateLoader, error)
	// Close deletes local resources associated with this ThelmaApp, and should be called once before the program exits.
	Close() error
}

ThelmaApp holds references to global/cross-cutting dependencies for Thelma commands

func New

func New(cfg config.Config, creds credentials.Credentials, clients clients.Clients, installer autoupdate.AutoUpdate, scratch scratch.Scratch, shellRunner shell.Runner, stateLoader lazy.LazyE[terra.StateLoader], manageSingletons bool) (ThelmaApp, error)

New constructs a new ThelmaApp

Directories

Path Synopsis
Package autoupdate implements Thelma's self-install and self-update features
Package autoupdate implements Thelma's self-install and self-update features
bootstrap
Package bootstrap handles initial installation for Thelma.
Package bootstrap handles initial installation for Thelma.
manifest
Package manifest contains logic for parsing Thelma build manifests
Package manifest contains logic for parsing Thelma build manifests
Package env includes utilities for interacting with environment variables
Package env includes utilities for interacting with environment variables
labels
Package labels contains utility functions for generating a standard set of labels for terra.State objects Note that you cannot record two metrics with the same name and a different set of labels; if you do, the prometheus client library will panic.
Package labels contains utility functions for generating a standard set of labels for terra.State objects Note that you cannot record two metrics with the same name and a different set of labels; if you do, the prometheus client library will panic.

Jump to

Keyboard shortcuts

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