session

package
v1.7.6 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: Apache-2.0 Imports: 24 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Clear added in v1.5.2

func Clear()

Clear is meant to destroy all the cached sessions.

func IsUnidentifiedVCenterVersion added in v1.3.2

func IsUnidentifiedVCenterVersion(err error) bool

Types

type Feature added in v0.8.0

type Feature struct {
	EnableKeepAlive   bool
	KeepAliveDuration time.Duration
}

func DefaultFeature added in v0.8.0

func DefaultFeature() Feature

type Params added in v0.8.0

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

func NewParams added in v0.8.0

func NewParams() *Params

func (*Params) WithDatacenter added in v0.8.0

func (p *Params) WithDatacenter(datacenter string) *Params

func (*Params) WithFeatures added in v0.8.0

func (p *Params) WithFeatures(feature Feature) *Params

func (*Params) WithServer added in v0.8.0

func (p *Params) WithServer(server string) *Params

func (*Params) WithThumbprint added in v0.8.0

func (p *Params) WithThumbprint(thumbprint string) *Params

func (*Params) WithUserInfo added in v0.8.0

func (p *Params) WithUserInfo(username, password string) *Params

type Session

type Session struct {
	*govmomi.Client
	Finder *find.Finder

	TagManager *tags.Manager
	// contains filtered or unexported fields
}

Session is a vSphere session with a configured Finder.

func GetOrCreate

func GetOrCreate(ctx context.Context, params *Params) (*Session, error)

GetOrCreate gets a cached session or creates a new one if one does not already exist.

func (*Session) FindByBIOSUUID

func (s *Session) FindByBIOSUUID(ctx context.Context, uuid string) (object.Reference, error)

FindByBIOSUUID finds an object by its BIOS UUID.

To avoid comments about this function's name, please see the Golang WIKI https://github.com/golang/go/wiki/CodeReviewComments#initialisms. This function is named in accordance with the example "XMLHTTP".

func (*Session) FindByInstanceUUID

func (s *Session) FindByInstanceUUID(ctx context.Context, uuid string) (object.Reference, error)

FindByInstanceUUID finds an object by its instance UUID.

func (*Session) GetVersion added in v1.3.2

func (s *Session) GetVersion() (infrav1.VCenterVersion, error)

Jump to

Keyboard shortcuts

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