application

package module
v0.0.0-...-4966ce5 Latest Latest
Warning

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

Go to latest
Published: May 10, 2022 License: MIT Imports: 9 Imported by: 4

README

application

AFAIRE

Go Report Card Go Reference

Licence

MIT.


Copyright (c) 2021-2022 losyme

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrStop = errors.New("stop application")

Functions

This section is empty.

Types

type Application

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

func New

func New(name, version, builtAt, usage string) *Application

func (*Application) BuiltAt

func (a *Application) BuiltAt() time.Time

func (*Application) DebugLevel

func (a *Application) DebugLevel() DebugLevel

func (*Application) DevelEnv

func (a *Application) DevelEnv() bool

func (*Application) ID

func (a *Application) ID() string

func (*Application) IsStopping

func (a *Application) IsStopping() bool

func (*Application) LookupEnv

func (a *Application) LookupEnv(env string) (string, bool)

func (*Application) Name

func (a *Application) Name() string

func (*Application) OnError

func (a *Application) OnError(err error) error

func (*Application) SetDebugLevel

func (a *Application) SetDebugLevel(dl DebugLevel) DebugLevel

func (*Application) StartedAt

func (a *Application) StartedAt() time.Time

func (*Application) Stop

func (a *Application) Stop()

func (*Application) StopChannel

func (a *Application) StopChannel() <-chan struct{}

func (*Application) Usage

func (a *Application) Usage() string

func (*Application) Version

func (a *Application) Version() string

type DebugLevel

type DebugLevel int
const (
	DebugOff DebugLevel = iota + 1
	DebugLight
	DebugHeavy
)

Jump to

Keyboard shortcuts

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