cache

package
v0.0.0-...-d674e6d Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	DatastoreInfoProperty = "info"
	SummaryProperty       = "summary"
)

Variables

View Source
var (
	ErrDatastoreNotFound = fmt.Errorf("datastore not found")
)

Functions

This section is empty.

Types

type VSphereCache

type VSphereCache interface {
	// GetDatacenter returns datacenter by name.
	GetDatacenter(ctx context.Context, dcName string) (*object.Datacenter, error)
	// GetDataStore returns datastore by name or by path - both can be used.
	GetDatastore(ctx context.Context, dcName, dsName string) (*object.Datastore, error)
	// GetDatastoreByURL returns datastore by URL.
	GetDatastoreByURL(ctx context.Context, dcName, dsURL string) (mo.Datastore, error)
	// GetDataStoreMo returns datastore's ManagedObject by name or by path - both can be used.
	GetDatastoreMo(ctx context.Context, dcName, dsName string) (mo.Datastore, error)
	// GetDatastoreByURL returns datastore by URL.
	GetDatastoreMoByReference(ctx context.Context, dcName string, ref types.ManagedObjectReference) (mo.Datastore, error)
	// GetDatastoreByURL returns all StoragePods in a datacenter
	GetStoragePods(ctx context.Context) ([]mo.StoragePod, error)
}

VSphereCache is an interface to cache of frequently accessed vCenter objects, such as datacenter or datastore.

func NewCheckCache

func NewCheckCache(vmClient *vim25.Client) VSphereCache

Jump to

Keyboard shortcuts

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