loader

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EnvFile string
View Source
var GinLevel golog.Level = 6
View Source
var InfoEnvi *types.Environment
View Source
var InfoIdentService *types.IdentityService

App Informations

View Source
var InfoIdentSource *types.IdentitySource
View Source
var InfoNetwork *types.IdentityNetwork
View Source
var InfoReplica *types.Replica
View Source
var Stopper = []func(){}

List of stop function

Functions

func Environment

func Environment()

Loading .env environment variable into memory.

func Launching

func Launching()

func Logger

func Logger()

func Network added in v1.4.7

func Network()

func OnShutdown added in v1.4.6

func OnShutdown()

func Replica added in v1.4.7

func Replica()

func WaitForExitSignal added in v1.4.10

func WaitForExitSignal()

Hold the thread for exitting

Types

type LetsFormatter

type LetsFormatter struct {
	Indent string
	// contains filtered or unexported fields
}

LetsFormatter is a Formatter type for JSON logs.

func (*LetsFormatter) Format

func (f *LetsFormatter) Format(dest io.Writer, log *golog.Log) bool

Format prints the logs in JSON format.

Usage: logger.SetFormat("json") or logger.SetLevelFormat("info", "json")

func (*LetsFormatter) Options

func (f *LetsFormatter) Options(opts ...interface{}) golog.Formatter

Options sets the options for the JSON Formatter (currently only indent).

func (*LetsFormatter) String

func (f *LetsFormatter) String() string

String returns the name of the Formatter. In this case it returns "json". It's used to map the formatter names with their implementations.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳