ovfcache

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoGetter = internal.ErrNoGetter

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

Functions

func GetOVFEnvelope

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

GetOVFEnvelope returns the OVF envelope for the provided item ID, either from the cache or from vSphere. If the item is not in the cache, it will be cached prior to being returned.

func JoinContext

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

JoinContext returns a context with the OVF cache from the right or left, in that order.

func SetGetter

func SetGetter(parent context.Context, getter GetterFn)

SetGetter assigns to the context the function used to retrieve an OVF envelope when it is not in the cache.

func WithContext

func WithContext(parent context.Context) context.Context

WithContext returns a new context with an OVF cache.

Types

type GetterFn

type GetterFn = internal.GetterFn

GetterFn returns an OVF envelope for a provided library item ID.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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