Documentation ¶
Index ¶
- func WithChildAction(ctx context.Context) context.Context
- type DebugMiddleware
- type ExperimentationMiddleware
- type HooksMiddleware
- type Middleware
- func NewDebugMiddleware(options *Options, console input.Console) Middleware
- func NewExperimentationMiddleware() Middleware
- func NewHooksMiddleware(lazyEnvManager *lazy.Lazy[environment.Manager], ...) Middleware
- func NewTelemetryMiddleware(options *Options, lazyPlatformConfig *lazy.Lazy[*platform.Config]) Middleware
- func NewUxMiddleware(options *Options, console input.Console) Middleware
- type MiddlewareRunner
- type NextFn
- type Options
- type ResolveFn
- type TelemetryMiddleware
- type UxMiddleware
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DebugMiddleware ¶
type DebugMiddleware struct {
// contains filtered or unexported fields
}
Adds support to easily debug and attach a debugger to AZD for development purposes
func (*DebugMiddleware) Run ¶
func (m *DebugMiddleware) Run(ctx context.Context, next NextFn) (*actions.ActionResult, error)
Invokes the debug middleware. When AZD_DEBUG is set will prompt the user to attach a debugger before continuing invocation of the action
type ExperimentationMiddleware ¶
type ExperimentationMiddleware struct { }
func (*ExperimentationMiddleware) Run ¶
func (m *ExperimentationMiddleware) Run(ctx context.Context, next NextFn) (*actions.ActionResult, error)
type HooksMiddleware ¶
type HooksMiddleware struct {
// contains filtered or unexported fields
}
func (*HooksMiddleware) Run ¶
func (m *HooksMiddleware) Run(ctx context.Context, next NextFn) (*actions.ActionResult, error)
Runs the Hooks middleware
type Middleware ¶
type Middleware interface {
Run(ctx context.Context, nextFn NextFn) (*actions.ActionResult, error)
}
Defines a middleware component
func NewDebugMiddleware ¶
func NewDebugMiddleware(options *Options, console input.Console) Middleware
Creates a new instance of the Debug middleware
func NewExperimentationMiddleware ¶
func NewExperimentationMiddleware() Middleware
func NewHooksMiddleware ¶
func NewHooksMiddleware( lazyEnvManager *lazy.Lazy[environment.Manager], lazyEnv *lazy.Lazy[*environment.Environment], lazyProjectConfig *lazy.Lazy[*project.ProjectConfig], importManager *project.ImportManager, commandRunner exec.CommandRunner, console input.Console, options *Options, ) Middleware
Creates a new instance of the Hooks middleware
func NewTelemetryMiddleware ¶
func NewTelemetryMiddleware(options *Options, lazyPlatformConfig *lazy.Lazy[*platform.Config]) Middleware
Creates a new Telemetry middleware instance
func NewUxMiddleware ¶
func NewUxMiddleware(options *Options, console input.Console) Middleware
type MiddlewareRunner ¶
type MiddlewareRunner struct {
// contains filtered or unexported fields
}
Middleware runner stores middleware registrations and orchestrates the invocation of middleware components and actions.
func NewMiddlewareRunner ¶
func NewMiddlewareRunner(container *ioc.NestedContainer) *MiddlewareRunner
Creates a new middleware runner
func (*MiddlewareRunner) RunAction ¶
func (r *MiddlewareRunner) RunAction( ctx context.Context, runOptions *Options, actionName string, ) (*actions.ActionResult, error)
Executes the middleware chain for the specified action
type NextFn ¶
type NextFn func(ctx context.Context) (*actions.ActionResult, error)
Executes the next middleware in the command chain
type Options ¶
type Options struct { CommandPath string Name string Aliases []string Flags *pflag.FlagSet Args []string // contains filtered or unexported fields }
Middleware Run options
func (*Options) WithContainer ¶
func (o *Options) WithContainer(container *ioc.NestedContainer)
Sets the container to be used for resolving middleware components
type ResolveFn ¶
type ResolveFn func() Middleware
Registration function that returns a constructed middleware
type TelemetryMiddleware ¶
type TelemetryMiddleware struct {
// contains filtered or unexported fields
}
Telemetry middleware tracks telemetry for the given action
func (*TelemetryMiddleware) Run ¶
func (m *TelemetryMiddleware) Run(ctx context.Context, next NextFn) (*actions.ActionResult, error)
Invokes the middleware and wraps the action with a telemetry span for telemetry reporting
type UxMiddleware ¶
type UxMiddleware struct {
// contains filtered or unexported fields
}
func (*UxMiddleware) Run ¶
func (m *UxMiddleware) Run(ctx context.Context, next NextFn) (*actions.ActionResult, error)