runner

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2026 License: MIT Imports: 13 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Runner

type Runner[RT func(*Runtime[CT]) error, CT any] struct {
	// contains filtered or unexported fields
}

func New

func New[RT func(*Runtime[CT]) error, CT any](run RT) *Runner[RT, CT]

func (*Runner[RT, CT]) AddConsoleLogWriter

func (r *Runner[RT, CT]) AddConsoleLogWriter() *Runner[RT, CT]

func (*Runner[RT, CT]) AddHTTPLogWriter

func (r *Runner[RT, CT]) AddHTTPLogWriter() *Runner[RT, CT]

func (*Runner[RT, CT]) AddLogWriter

func (r *Runner[RT, CT]) AddLogWriter(w io.Writer) *Runner[RT, CT]

func (*Runner[RT, CT]) LoadConfigFile

func (r *Runner[RT, CT]) LoadConfigFile(path string) *Runner[RT, CT]

func (*Runner[RT, CT]) LoadEnvConfig

func (r *Runner[RT, CT]) LoadEnvConfig() *Runner[RT, CT]

func (*Runner[RT, CT]) Run

func (r *Runner[RT, CT]) Run() error

func (*Runner[RT, CT]) RunContext

func (r *Runner[RT, CT]) RunContext(ctx context.Context) error

func (*Runner[RT, CT]) SetAppName

func (r *Runner[RT, CT]) SetAppName(name string) *Runner[RT, CT]

func (*Runner[RT, CT]) SetAppVersion

func (r *Runner[RT, CT]) SetAppVersion(ver string) *Runner[RT, CT]

func (*Runner[RT, CT]) SetConfig

func (r *Runner[RT, CT]) SetConfig(cfg CT) *Runner[RT, CT]

type Runtime

type Runtime[CT any] struct {
	Ctx        context.Context
	AppName    string
	AppName2   string
	AppVersion string
	Cfg        *CT
	Log        zerolog.Logger
}

type Validatable

type Validatable interface {
	Validate() error
}

Jump to

Keyboard shortcuts

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