key

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2025 License: MIT, Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package key provides an internal set of keys for use with context.WithValue and context.Context.Value that can be shared across packages source.

Each key has a private type (a `struct{}`) and a public instance of that type.

Index

Constants

View Source
const ForceNoDetailedDiff = "__x-force-no-detailed-diff"

ForceNoDetailedDiff acts as a side-channel in github.com/sapslaj/mid/pkg/providerfw.DiffResponse.DetailedDiff to set HasDetailedDiff to false.

This is necessary for the github.com/sapslaj/mid/pkg/providerfw/middleware/rpc.Provider, but should not be used by outside providers, as they should support detailed diff in all cases.

The key should never be exposed at the gRPC wire level.

Variables

View Source
var (
	// RuntimeInfo is used to retrieve an [infer.RuntimeInfo] from ctx.
	RuntimeInfo = runtimeInfoType{}
	// Logger is used to retrieve an [infer.Logger] from ctx.
	Logger = logType{}
	// URN is used to retrieve an URN from ctx.
	URN = urnType{}
	// ProviderHost is used to retrieve a [provider.ProviderHost] from ctx.
	ProviderHost = providerHostType{}
)

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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