maptags

package
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Provider

func Provider(ctx context.Context, cfg *viper.Viper) (providers.ContextTagger, error)

Provider returns a ContextTagger that tags contexts with the given data and logTags

Types

type MapTags

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

func New

func New(data map[string]interface{}, logTags []string) *MapTags

func (*MapTags) Get

func (m *MapTags) Get(key string) (any, bool)

func (*MapTags) GetContextID

func (m *MapTags) GetContextID() (string, bool)

func (*MapTags) GetError

func (m *MapTags) GetError() (error, bool)

func (*MapTags) GetMetadata

func (m *MapTags) GetMetadata() (metadata.MD, bool)

func (*MapTags) GetMethod

func (m *MapTags) GetMethod() (string, bool)

func (*MapTags) LogTags

func (m *MapTags) LogTags() map[string]any

func (*MapTags) Set

func (m *MapTags) Set(key string, value any) providers.Tags

func (*MapTags) WithContextID

func (m *MapTags) WithContextID(contextID string) providers.Tags

func (*MapTags) WithError

func (m *MapTags) WithError(err error) providers.Tags

func (*MapTags) WithMetadata

func (m *MapTags) WithMetadata(md metadata.MD) providers.Tags

func (*MapTags) WithMethod

func (m *MapTags) WithMethod(method string) providers.Tags

Jump to

Keyboard shortcuts

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