Help us shape the future of Go! Take the 2026 Go Developer Survey

lockunlock

package
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package lockunlock provides functionality to lock and unlock servers that have been provisioned by the OpenStack Compute service.

Example to Lock and Unlock a Server

serverID := "47b6b7b7-568d-40e4-868c-d5c41735532e"

err := lockunlock.Lock(computeClient, serverID).ExtractErr()
if err != nil {
	panic(err)
}

err = lockunlock.Unlock(computeClient, serverID).ExtractErr()
if err != nil {
	panic(err)
}

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LockResult

type LockResult struct {
	gophercloud.ErrResult
}

LockResult and UnlockResult are the responses from a Lock and Unlock operations respectively. Call their ExtractErr methods to determine if the requests suceeded or failed.

func Lock

func Lock(client *gophercloud.ServiceClient, id string) (r LockResult)

Lock is the operation responsible for locking a Compute server.

type UnlockResult

type UnlockResult struct {
	gophercloud.ErrResult
}

func Unlock

func Unlock(client *gophercloud.ServiceClient, id string) (r UnlockResult)

Unlock is the operation responsible for unlocking a Compute server.

Directories

Path Synopsis
unlocklock unit tests
unlocklock unit tests

Jump to

Keyboard shortcuts

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