Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct {
// WaitGroup is used to wait for asynchronous workers to complete.
WaitGroup *sync.WaitGroup
// Ctx will be canceled when SIGINT or SIGTERM are notified.
Ctx context.Context
// Some parameters
Logger zerolog.Logger
}
Context of execution. It consists of logger and cancelation context.
func (Context) WithContext ¶
WithContext sets Context and returns self copy.
func (Context) WithFields ¶
WithFields sets Logger fields and returns a copy of the context.
ctx := context.New().WithFields(func(f context.Fields) context.Fields){
return f.Str("Version", "v1.2.3")
})
Click to show internal directories.
Click to hide internal directories.