config

package
v0.0.0-...-730401b Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitLogger

func InitLogger() *zapLog.SugaredLogger

func Logger

func Logger(ctx context.Context) *zapLog.SugaredLogger

Logger returns a zap logger with as much context as possible

func NewContext

func NewContext(ctx context.Context, fields interface{}) context.Context

func WithContext

func WithContext(ctx context.Context) *zapLog.SugaredLogger

func WithRqId

func WithRqId(ctx context.Context, rqId string) context.Context

WithRqId returns a context which knows its request ID

Types

type Snowflake

type Snowflake interface {
	GetNewID() int64
}

func NewSnowflake

func NewSnowflake() Snowflake

Jump to

Keyboard shortcuts

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