broker

package
v0.0.0-...-3cc3ff2 Latest Latest
Warning

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

Go to latest
Published: May 17, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	Parent   *Context
	Name     string
	Module   string
	Zap      *zap.Logger
	Atom     *zap.AtomicLevel
	Children []*Context
}

A Context carries the module name and logger across module boundaries

func Child

func Child(parent *Context) *Context

Child creates a new context sets the given context as it's parent and appends the newly created context as a child

func NewBackground

func NewBackground() *Context

NewBackground constructs a new context with a Atom log level set to fatal level avoiding to write logs.

func NewContext

func NewContext() *Context

NewContext constructs a new empty context

func WithModule

func WithModule(parent *Context, parts ...string) *Context

WithModule creates a new child context with the given module name

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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