shared

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2026 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EphemeralResourceCloseTimeout = 10 * time.Second

This may be modified to expedite tests

Functions

func ContextWithTracer

func ContextWithTracer(parent context.Context, tracer *Tracer) context.Context

ContextWithTracer returns a new context derived from parent that carries a Tracer.

Use the resulting context when calling [ApplyPlannedChanges], to get event notification callbacks throughout the planning process.

Types

type EphemeralCloseFunc

type EphemeralCloseFunc func(context.Context) tfdiags.Diagnostics

type Tracer

type Tracer struct {

	// StartEphemeralResourceInstanceOpen and EndEphemeralResourceInstanceOpen
	// mark the beginning and end of the work to open the identified ephemeral
	// resource instance.
	StartEphemeralResourceInstanceOpen func(ctx context.Context, addr addrs.AbsResourceInstance) context.Context
	EndEphemeralResourceInstanceOpen   func(ctx context.Context, addr addrs.AbsResourceInstance, diags tfdiags.Diagnostics)

	// StartEphemeralResourceInstanceRenew and EndEphemeralResourceInstanceRenew
	// mark the beginning and end of the work to renew the identified ephemeral
	// resource instance.
	StartEphemeralResourceInstanceRenew func(ctx context.Context, addr addrs.AbsResourceInstance) context.Context
	EndEphemeralResourceInstanceRenew   func(ctx context.Context, addr addrs.AbsResourceInstance, diags tfdiags.Diagnostics)

	// StartEphemeralResourceInstanceClose and EndEphemeralResourceInstanceClose
	// mark the beginning and end of the work to close the identified ephemeral
	// resource instance.
	StartEphemeralResourceInstanceClose func(ctx context.Context, addr addrs.AbsResourceInstance) context.Context
	EndEphemeralResourceInstanceClose   func(ctx context.Context, addr addrs.AbsResourceInstance, diags tfdiags.Diagnostics)
}

Tracer represents a set of tracing event handlers for events that are common across the planning and applying phases.

Jump to

Keyboard shortcuts

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