run

package module
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2024 License: MIT Imports: 17 Imported by: 13

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadConfig added in v0.7.0

func ReadConfig(appName string, args []string, config any) error

ReadConfig reads config from file and CLI flags. First, config file is read and default values are taken from there. Then, those values (or respective env variables) are used as defaults for CLI flags. Finally, config fields are set based on the flags.

func WithFlavours added in v0.5.0

func WithFlavours(ctx context.Context, flavours []FlavourFunc, appFunc parallel.Task) error

WithFlavours runs task with flavours installed.

Types

type Environment added in v0.6.0

type Environment struct {
	// contains filtered or unexported fields
}

Environment boots up the application.

func New added in v0.6.0

func New() Environment

New creates new environment.

func (Environment) Run added in v0.6.0

func (e Environment) Run(ctx context.Context, appName string, appFunc interface{})

Run runs an application inside configured environment.

func (Environment) WithContainerBuilder added in v0.6.0

func (e Environment) WithContainerBuilder(containerBuilder func(c *ioc.Container)) Environment

WithContainerBuilder sets IoC builder.

func (Environment) WithFlavour added in v0.6.0

func (e Environment) WithFlavour(flavourFunc FlavourFunc) Environment

WithFlavour adds flavour to the environment.

type FlavourFunc added in v0.5.0

type FlavourFunc func(ctx context.Context, appFunc parallel.Task) error

FlavourFunc represents a flavour function.

Jump to

Keyboard shortcuts

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