bootstrap

package
v0.0.0-...-27647ab Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2023 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Overview

TODO:

  • expansion - {foo}
  • 'EnvSetter' ..

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bootstrap

func Bootstrap(cfg Config) (fn bt.ErrFn, err error)

func DumpBootstrap

func DumpBootstrap(cfg DumpConfig, ds *eu.DeferStack) error

func EnvBootstrap

func EnvBootstrap(cfg EnvConfig, ds *eu.DeferStack) error

func LimitsBootstrap

func LimitsBootstrap(cfg LimitsConfig, ds *eu.DeferStack) error

func LogBootstrap

func LogBootstrap(cfg LogConfig, ds *eu.DeferStack) error

func PathsBootstrap

func PathsBootstrap(cfg PathsConfig, ds *eu.DeferStack) (err error)

Types

type Config

type Config struct {
	Env    EnvConfig
	Paths  PathsConfig
	Limits LimitsConfig
	Log    LogConfig
	Dump   DumpConfig
}

type DumpConfig

type DumpConfig struct {
	Interval bt.Optional[time.Duration]
}

type EnvConfig

type EnvConfig struct {
	Entries []EnvEntry
}

type EnvEntry

type EnvEntry interface {
	// contains filtered or unexported methods
}

type FileEnvEntry

type FileEnvEntry struct {
	Name string
}

type LimitsConfig

type LimitsConfig struct {
	Limits map[string]bt.Optional[uint64]
	Reset  bool
}

type LogConfig

type LogConfig struct {
	Format LogFormat
	Level  slog.Level
	Reset  bool
}

type LogFormat

type LogFormat int8
const (
	LogText LogFormat = iota
	LogJson
	LogNone
)

type PathsConfig

type PathsConfig struct {
	Cwd string
}

type SetEnvEntry

type SetEnvEntry struct {
	Key   string
	Value string
}

type UnsetEnvEntry

type UnsetEnvEntry struct {
	Key string
}

Directories

Path Synopsis
dev

Jump to

Keyboard shortcuts

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