Documentation ¶
Index ¶
- func KeepAlive(roundTripper soap.RoundTripper, idleTime time.Duration) soap.RoundTripper
- type Manager
- func (sm *Manager) Login(ctx context.Context, u *url.Userinfo) error
- func (sm *Manager) Logout(ctx context.Context) error
- func (sm Manager) Reference() types.ManagedObjectReference
- func (sm *Manager) SessionIsActive(ctx context.Context) (bool, error)
- func (sm *Manager) UserSession(ctx context.Context) (*types.UserSession, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func KeepAlive ¶
func KeepAlive(roundTripper soap.RoundTripper, idleTime time.Duration) soap.RoundTripper
KeepAlive wraps the specified soap.RoundTripper and executes a meaningless API request in the background after the RoundTripper has been idle for the specified amount of idle time. The keep alive process only starts once a user logs in and runs until the user logs out again.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func (Manager) Reference ¶
func (sm Manager) Reference() types.ManagedObjectReference
func (*Manager) SessionIsActive ¶
SessionIsActive checks whether the session that was created at login is still valid. This function only works against vCenter.
func (*Manager) UserSession ¶
UserSession retrieves and returns the SessionManager's CurrentSession field. Nil is returned if the session is not authenticated.
Click to show internal directories.
Click to hide internal directories.