Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var (
Version, Build string
Description string
)
These var should be set externally by a build.sh
Functions ¶
func Dir ¶
Dir will create the directory tree when it does not exist and return a string representation of the full composite path. A file is presumed to be the last element when any of the following ._- characters are present
func Fork ¶
func Fork(cfg ...interface{})
Fork is an wrapper around NewEnv that enables a program to run normally or like a daemon with start|stop signals and control referencse are written to /var/fork/{name.pid} and should be left alone for proper Fork processing
func NewGraceful ¶ added in v1.6.0
func NewGraceful() *graceful
NewGraceful configurator returns *graceful and starts the shutdown controller to capture (os.Interrupt, syscall.SIGTERM, syscall.SIGHUP) signals and waits on the <-graceful.context.Done() for a signal and waits for the graceful.Manager controller wgShutdown to confirm all managed processes and completed tasks finish before the program terminates execution
Types ¶
type Expire ¶ added in v1.1.0
type Expire struct {
CheckOn time.Duration // frequency of checks (default: hourly)
// contains filtered or unexported fields
}
Expire struct
func (*Expire) Add ¶ added in v1.1.0
Add will register a directory/path with customized age timeframe
type Parser ¶
Parser struct
func (*Parser) Do ¶ added in v1.6.0
func (p *Parser) Do(cfg ...interface{})
Do will set the speficied cfg values accoring to the tags present and will overload default values with {name}.conf file values, when a conf file is specified, followed by os.Args values, and finally overload with os.Environ values. When set EnvMirror sets all the final values in the key:value os.Environment table.
env: require,order,environ flags name: alternate name for parameter default: default (string, bool, int/64, uint/64 types are supported)
type Persist ¶ added in v1.5.0
type Persist string
Persist type
type PersistMap ¶ added in v1.5.0
PersistMap type