session

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2022 License: Apache-2.0 Imports: 18 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Feature added in v0.8.0

type Feature struct {
	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.

Jump to

Keyboard shortcuts

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