Documentation
¶
Index ¶
- func LoadConfig(path string, cfg any, envKeywordParsers map[string]envldr.Parser, ...) error
- func NewLogger(config LoggerConfig) (logger *log_level.Logger, out *os.File, err error)
- func NewUnixListener(path string, uid int, gid int, mode fs.FileMode) (listener *net.UnixListener, err error)
- func PrintInfo(items ...string)
- func ToJsonStr(v any) (str string)
- type LogFileError
- type LoggerConfig
- type SecretString
- type Watchdog
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadConfig ¶
func NewLogger ¶ added in v0.7.0
func NewLogger(config LoggerConfig) (logger *log_level.Logger, out *os.File, err error)
func NewUnixListener ¶
Types ¶
type LogFileError ¶
type LogFileError struct {
// contains filtered or unexported fields
}
func (*LogFileError) Error ¶
func (e *LogFileError) Error() string
func (*LogFileError) Unwrap ¶ added in v0.7.0
func (e *LogFileError) Unwrap() error
type LoggerConfig ¶ added in v0.5.1
type LoggerConfig struct { Level level.Level `json:"level" env_var:"LOGGER_LEVEL"` Utc bool `json:"utc" env_var:"LOGGER_UTC"` Path string `json:"path" env_var:"LOGGER_PATH"` FileName string `json:"file_name" env_var:"LOGGER_FILE_NAME"` Terminal bool `json:"terminal" env_var:"LOGGER_TERMINAL"` Microseconds bool `json:"microseconds" env_var:"LOGGER_MICROSECONDS"` Prefix string `json:"prefix" env_var:"LOGGER_PREFIX"` }
type SecretString ¶ added in v0.12.0
type SecretString string
func (SecretString) MarshalJSON ¶ added in v0.12.0
func (s SecretString) MarshalJSON() ([]byte, error)
func (SecretString) String ¶ added in v0.12.0
func (s SecretString) String() string
func (*SecretString) UnmarshalJSON ¶ added in v0.12.0
func (s *SecretString) UnmarshalJSON(b []byte) error
type Watchdog ¶ added in v0.9.0
type Watchdog struct {
// contains filtered or unexported fields
}
func NewWatchdog ¶ added in v0.9.0
func (*Watchdog) RegisterHealthFunc ¶ added in v0.9.0
func (*Watchdog) RegisterStopFunc ¶ added in v0.9.0
Click to show internal directories.
Click to hide internal directories.