loader

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2025 License: Apache-2.0 Imports: 21 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

View Source
var SystemInfoConfig types.ISystemInfo

Functions

func Environment

func Environment()

Loading .env environment variable into memory.

func Launching

func Launching()

func Logger

func Logger()

func Network

func Network()

Network collects network interface information for the system. This includes IP addresses (IPv4/IPv6), hostnames, and network interfaces. Can be disabled via environment variable: LETS_ENABLE_NETWORK_INFO=false

func OnShutdown

func OnShutdown()

func Replica

func Replica()

Replica collects replica IP addresses from network hostnames. Requires Network() to be called first to populate InfoNetwork. Can be disabled via environment variable: LETS_ENABLE_REPLICA_INFO=false

func WaitForExitSignal

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.

type SystemInfo added in v1.0.5

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

SystemInfo provides default configuration for system information display

func NewSystemInfoFromEnv added in v1.0.5

func NewSystemInfoFromEnv() *SystemInfo

NewSystemInfoFromEnv creates SystemInfo from environment variables

func (*SystemInfo) EnableNetworkInfo added in v1.0.5

func (s *SystemInfo) EnableNetworkInfo() bool

func (*SystemInfo) EnableReplicaInfo added in v1.0.5

func (s *SystemInfo) EnableReplicaInfo() bool

func (*SystemInfo) EnableStartupBanner added in v1.0.5

func (s *SystemInfo) EnableStartupBanner() bool

func (*SystemInfo) EnableVerboseNetworkInfo added in v1.0.5

func (s *SystemInfo) EnableVerboseNetworkInfo() bool

Jump to

Keyboard shortcuts

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