Documentation ¶
Index ¶
- Variables
- func ClientIsActive(ctx context.Context, c *govmomi.Client) bool
- func CloseClient(ctx context.Context, c *govmomi.Client)
- func CloseRestClient(ctx context.Context, rc *rest.Client)
- func IsHardQueryError(err error) (bool, error)
- func NewClient(ctx context.Context, u *url.URL, t *tls.ClientConfig) (*govmomi.Client, error)
- func NewRestClient(ctx context.Context, u *url.URL, t *tls.ClientConfig, c *govmomi.Client) (*rest.Client, error)
- func PaseURL(vcenterURL, user, pass string) (*url.URL, error)
- func RestClientIsActive(ctx context.Context, rc *rest.Client) bool
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrorNoClient = errors.New("no vCenter client, no session has been opened") ErrorNotVC = errors.New("endpoint does not look like a vCenter") ErrorURLParsing = errors.New("error parsing URL for vcenter") ErrorURLNil = errors.New("vcenter URL should not be nil") )
Common raised errors
Functions ¶
func ClientIsActive ¶
ClientIsActive returns true if the vCenter soap session is active
func CloseClient ¶
CloseClient closes govmomi client
func CloseRestClient ¶
CloseRestClient closes vSphere rest client
func IsHardQueryError ¶
IsHardQueryError returns false if error is light and we may continue quering
func NewRestClient ¶
func NewRestClient( ctx context.Context, u *url.URL, t *tls.ClientConfig, c *govmomi.Client, ) (*rest.Client, error)
NewRestClient creates a vSphere rest.Client (ie tags queries)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.