internal

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoGetter = errors.New("ovfcache getter fn is nil")

ErrNoGetter is returned from GetOVFEnvelope if there is no getter function.

Functions

func GetLock

func GetLock(
	ctx context.Context,
	itemID string) sync.Locker

func GetOVFEnvelope

func GetOVFEnvelope(
	ctx context.Context,
	itemID, contentVersion string) (env *ovf.Envelope, err error)

func JoinContext

func JoinContext(left, right context.Context) context.Context

func SetGetter

func SetGetter(parent context.Context, getter GetterFn)

func WithContext

func WithContext(
	parent context.Context,
	maxCachedItems int,
	expireAfter, expireCheckInterval time.Duration) context.Context

WithContext returns a new context with an OVF cache.

Types

type ContextValueType

type ContextValueType struct {
	// contains filtered or unexported fields
}

func Cache

func Cache(ctx context.Context) ContextValueType

type GetterFn

type GetterFn func(ctx context.Context, itemID string) (*ovf.Envelope, error)

type VersionedOVFEnvelope

type VersionedOVFEnvelope struct {
	OvfEnvelope    *ovf.Envelope
	ContentVersion string
}

Jump to

Keyboard shortcuts

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