Documentation ¶
Overview ¶
Package tf5serverlogging contains logging functionality specific to tf5server and tfprotov5 types.
Index ¶
- func ConfigureProviderClientCapabilities(ctx context.Context, ...)
- func Deferred(ctx context.Context, deferred *tfprotov5.Deferred)
- func DownstreamRequest(ctx context.Context) context.Context
- func DownstreamResponse(ctx context.Context, diagnostics diag.Diagnostics)
- func DownstreamResponseWithError(ctx context.Context, funcErr *tfprotov5.FunctionError)
- func ImportResourceStateClientCapabilities(ctx context.Context, ...)
- func OpenEphemeralResourceClientCapabilities(ctx context.Context, ...)
- func PlanResourceChangeClientCapabilities(ctx context.Context, ...)
- func ReadDataSourceClientCapabilities(ctx context.Context, capabilities *tfprotov5.ReadDataSourceClientCapabilities)
- func ReadResourceClientCapabilities(ctx context.Context, capabilities *tfprotov5.ReadResourceClientCapabilities)
- func ServerCapabilities(ctx context.Context, capabilities *tfprotov5.ServerCapabilities)
- type ContextKeyDownstreamRequestStartTime
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigureProviderClientCapabilities ¶ added in v0.23.0
func ConfigureProviderClientCapabilities(ctx context.Context, capabilities *tfprotov5.ConfigureProviderClientCapabilities)
ConfigureProviderClientCapabilities generates a TRACE "Announced client capabilities" log.
func Deferred ¶ added in v0.23.0
Deferred generates a TRACE "Received downstream deferred response" log if populated.
func DownstreamRequest ¶
DownstreamRequest sets a request duration start time context key and generates a TRACE "Sending request downstream" log.
func DownstreamResponse ¶
func DownstreamResponse(ctx context.Context, diagnostics diag.Diagnostics)
DownstreamResponse generates the following logging:
- TRACE "Received downstream response" log with request duration and diagnostic severity counts
- Per-diagnostic logs
func DownstreamResponseWithError ¶ added in v0.22.0
func DownstreamResponseWithError(ctx context.Context, funcErr *tfprotov5.FunctionError)
DownstreamResponseWithError generates the following logging:
- TRACE "Received downstream response" log with request duration and whether a function error is present
- Log with function error details
func ImportResourceStateClientCapabilities ¶ added in v0.23.0
func ImportResourceStateClientCapabilities(ctx context.Context, capabilities *tfprotov5.ImportResourceStateClientCapabilities)
ImportResourceStateClientCapabilities generates a TRACE "Announced client capabilities" log.
func OpenEphemeralResourceClientCapabilities ¶ added in v0.25.0
func OpenEphemeralResourceClientCapabilities(ctx context.Context, capabilities *tfprotov5.OpenEphemeralResourceClientCapabilities)
OpenEphemeralResourceClientCapabilities generates a TRACE "Announced client capabilities" log.
func PlanResourceChangeClientCapabilities ¶ added in v0.23.0
func PlanResourceChangeClientCapabilities(ctx context.Context, capabilities *tfprotov5.PlanResourceChangeClientCapabilities)
PlanResourceChangeClientCapabilities generates a TRACE "Announced client capabilities" log.
func ReadDataSourceClientCapabilities ¶ added in v0.23.0
func ReadDataSourceClientCapabilities(ctx context.Context, capabilities *tfprotov5.ReadDataSourceClientCapabilities)
ReadDataSourceClientCapabilities generates a TRACE "Announced client capabilities" log.
func ReadResourceClientCapabilities ¶ added in v0.23.0
func ReadResourceClientCapabilities(ctx context.Context, capabilities *tfprotov5.ReadResourceClientCapabilities)
ReadResourceClientCapabilities generates a TRACE "Announced client capabilities" log.
func ServerCapabilities ¶ added in v0.19.0
func ServerCapabilities(ctx context.Context, capabilities *tfprotov5.ServerCapabilities)
ServerCapabilities generates a TRACE "Announced server capabilities" log.
Types ¶
type ContextKeyDownstreamRequestStartTime ¶
type ContextKeyDownstreamRequestStartTime struct{}
ContextKeyDownstreamRequestStartTime is a context.Context key to store the time.Time when the server began a downstream request.