utils

package
v0.0.0-...-105f62c Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// GracefulShutdownCode - exit code
	GracefulShutdownCode = 2
)

Variables

This section is empty.

Functions

func RegisterGracefulShutdown

func RegisterGracefulShutdown(handle func(os.Signal))

RegisterGracefulShutdown - sets handler to catch SIGTERM and SIGKILL signals after executing handle function, application exits with GracefulShutdownCode code

Types

type LogLevel

type LogLevel int32
const (
	Trace LogLevel = iota
	Debug
	Info
	Warn
	Error
	Fatal
)

type Logger

type Logger struct {
	MinLogLevel LogLevel
}

func (*Logger) Debug

func (l *Logger) Debug(format string, args ...interface{})

func (*Logger) Error

func (l *Logger) Error(format string, args ...interface{})

func (*Logger) Fatal

func (l *Logger) Fatal(format string, args ...interface{})

func (*Logger) Info

func (l *Logger) Info(format string, args ...interface{})

func (*Logger) Trace

func (l *Logger) Trace(format string, args ...interface{})

func (*Logger) Warn

func (l *Logger) Warn(format string, args ...interface{})

Jump to

Keyboard shortcuts

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