context

package
v0.0.0-...-0117b6e Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 3 Imported by: 227

Documentation

Overview

Package context defines a type that carries context specific data such as the logger. Inspired by Google's http://godoc.org/golang.org/x/net/context

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type T

type T interface {
	Log() log.T
	AppConfig() appconfig.SsmagentConfig
	With(context string) T
	CurrentContext() []string
	AppConstants() *appconfig.AppConstants
	Identity() identity.IAgentIdentity
}

T transfers context specific data across different execution boundaries. Instead of adding the context to specific structs, we pass Context as the first parameter to the methods themselves.

func Default

func Default(logger log.T, ssmAppconfig appconfig.SsmagentConfig, agentIdentity identity.IAgentIdentity, contextList ...string) T

Default returns an empty context that use the default logger and appconfig.

Jump to

Keyboard shortcuts

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