client

package
v1.8.5 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewVimClient

NewVimClient creates a new vim25 client which is configured to use a custom keepalive handler function. Making this public to allow access from other packages when only VimClient is needed.

func RestKeepAliveHandlerFn

func RestKeepAliveHandlerFn(c *rest.Client, userInfo *url.Userinfo) func() error

RestKeepAliveHandlerFn returns a keepalive handler function suitable for use with the REST handler. Similar to the SOAP handler, we customize the handler here so we can re-login the client in case the REST session expires due to connectivity issues.

func SoapKeepAliveHandlerFn

func SoapKeepAliveHandlerFn(sc *soap.Client, sm *session.Manager, userInfo *url.Userinfo) func() error

SoapKeepAliveHandlerFn returns a keepalive handler function suitable for use with the SOAP handler. In case the connectivity to VC is down long enough, the session expires. Further attempts to use the client yield NotAuthenticated fault. This handler ensures that we re-login the client in those scenarios.

Types

type Client

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

func NewClient

func NewClient(ctx context.Context, config *config.VSphereVMProviderConfig) (*Client, error)

NewClient creates a new Client. As a side effect, it creates a vim25 client and a REST client.

func (*Client) ClusterModuleClient

func (c *Client) ClusterModuleClient() clustermodules.Provider

func (*Client) Config

func (c *Client) Config() *config.VSphereVMProviderConfig

func (*Client) ContentLibClient

func (c *Client) ContentLibClient() contentlibrary.Provider

func (*Client) Datacenter

func (c *Client) Datacenter() *object.Datacenter

func (*Client) Finder

func (c *Client) Finder() *find.Finder

func (*Client) Logout

func (c *Client) Logout(ctx context.Context)

func (*Client) RestClient

func (c *Client) RestClient() *rest.Client

func (*Client) VimClient

func (c *Client) VimClient() *vim25.Client

Jump to

Keyboard shortcuts

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