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.
Click to show internal directories.
Click to hide internal directories.