fromctx

package
v0.10.5 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CtxKeyKubeConfig         = Key(providerflags.FlagKubeConfig)
	CtxKeyKubeRESTClient     = Key("kube-restclient")
	CtxKeyKubeClientSet      = Key("kube-clientset")
	CtxKeyAkashClientSet     = Key("akash-clientset")
	CtxKeyPubSub             = Key("pubsub")
	CtxKeyLifecycle          = Key("lifecycle")
	CtxKeyErrGroup           = Key("errgroup")
	CtxKeyLogc               = ctxlog.CtxKeyLog
	CtxKeyStartupCh          = Key("startup-ch")
	CtxKeyInventoryUnderTest = Key("inventory-under-test")
	CtxKeyPersistentConfig   = Key("persistent-config")
	CtxKeyCertIssuer         = Key("cert-issuer")
	CtxKeyAccountQuerier     = Key("account-querier")
)

Variables

View Source
var (
	ErrNotFound         = errors.New("fromctx: not found")
	ErrValueInvalidType = errors.New("fromctx: invalid type")
)

Functions

func AccountQuerierFromCtx added in v0.8.3

func AccountQuerierFromCtx(ctx context.Context) (types.AccountQuerier, error)

func AkashClientFromCtx

func AkashClientFromCtx(ctx context.Context) (akashclientset.Interface, error)

func ApplyToContext

func ApplyToContext(ctx context.Context, config map[interface{}]interface{}) context.Context

func CertIssuerFromCtx added in v0.7.0

func CertIssuerFromCtx(ctx context.Context) (certissuer.CertIssuer, error)

func CmdSetContextValue

func CmdSetContextValue(cmd *cobra.Command, key, val interface{})

func ErrGroupFromCtx

func ErrGroupFromCtx(ctx context.Context) (*errgroup.Group, error)

func IsInventoryUnderTestFromCtx

func IsInventoryUnderTestFromCtx(ctx context.Context) bool

func KubeClientFromCtx

func KubeClientFromCtx(ctx context.Context) (kubernetes.Interface, error)

func KubeConfigFromCtx

func KubeConfigFromCtx(ctx context.Context) (*rest.Config, error)

func KubeRESTClientFromCtx

func KubeRESTClientFromCtx(ctx context.Context) (*rest.RESTClient, error)

func LifecycleFromCtx

func LifecycleFromCtx(ctx context.Context) (lifecycle.Lifecycle, error)

func LogrFromCtx

func LogrFromCtx(ctx context.Context) logr.Logger

func MustAccountQuerierFromCtx added in v0.8.3

func MustAccountQuerierFromCtx(ctx context.Context) types.AccountQuerier

func MustAkashClientFromCtx

func MustAkashClientFromCtx(ctx context.Context) akashclientset.Interface

func MustErrGroupFromCtx

func MustErrGroupFromCtx(ctx context.Context) *errgroup.Group

func MustKubeClientFromCtx

func MustKubeClientFromCtx(ctx context.Context) kubernetes.Interface

func MustKubeConfigFromCtx

func MustKubeConfigFromCtx(ctx context.Context) *rest.Config

func MustKubeRESTClientFromCtx

func MustKubeRESTClientFromCtx(ctx context.Context) *rest.RESTClient

func MustLifecycleFromCtx

func MustLifecycleFromCtx(ctx context.Context) lifecycle.Lifecycle

func MustPubSubFromCtx

func MustPubSubFromCtx(ctx context.Context) pubsub.PubSub

func MustStartupChFromCtx

func MustStartupChFromCtx(ctx context.Context) chan<- struct{}

func PersistentConfigFromCtx added in v0.7.0

func PersistentConfigFromCtx(ctx context.Context) (pconfig.Storage, error)

func PersistentConfigReaderFromCtx added in v0.7.0

func PersistentConfigReaderFromCtx(ctx context.Context) (pconfig.StorageR, error)

func PersistentConfigWriterFromCtx added in v0.7.0

func PersistentConfigWriterFromCtx(ctx context.Context) (pconfig.StorageW, error)

func PubSubFromCtx

func PubSubFromCtx(ctx context.Context) (pubsub.PubSub, error)

func StartupChFromCtx

func StartupChFromCtx(ctx context.Context) (chan<- struct{}, error)

Types

type Key

type Key string

Jump to

Keyboard shortcuts

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