context

package
v0.0.0-...-00846d5 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2026 License: Apache-2.0 Imports: 4 Imported by: 14

Documentation

Overview

Package context contains context details needed by the app to execute

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CoreAgentContext

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

CoreAgentContext defines a type that carries context specific data such as the logger.

func (*CoreAgentContext) AppConfig

func (c *CoreAgentContext) AppConfig() *appconfig.SsmagentConfig

AppConfig returns app config

func (*CoreAgentContext) Identity

Identity returns identity object

func (*CoreAgentContext) Log

func (c *CoreAgentContext) Log() log.T

Log returns the log

func (*CoreAgentContext) With

func (c *CoreAgentContext) With(logContext string) ICoreAgentContext

With updates the contextSlice that changes the log prefix

func (*CoreAgentContext) WithTelemetryNamespace

func (c *CoreAgentContext) WithTelemetryNamespace(telemetryNamespace string) ICoreAgentContext

WithTelemetryNamespace returns a new context with the specified telemetry namespace. All telemetry emission using this context will have this telemetry namespace.

type ICoreAgentContext

type ICoreAgentContext interface {
	Log() log.T
	AppConfig() *appconfig.SsmagentConfig
	Identity() identity.IAgentIdentity
	With(context string) ICoreAgentContext
	WithTelemetryNamespace(namespace string) ICoreAgentContext
}

ICoreAgentContext defines a type that carries context specific data such as the logger.

func NewCoreAgentContext

func NewCoreAgentContext(logger log.T, ssmAppconfig *appconfig.SsmagentConfig, agentIdentity identity.IAgentIdentity) (ICoreAgentContext, error)

NewCoreAgentContext creates and returns a new core agent context

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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