startstop

package
v2.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package startstop provides functionality to start and stop servers that have been provisioned by the Enterprise Cloud Compute service.

Example to Stop and Start a Server

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

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

err := startstop.Start(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 StartResult

type StartResult struct {
	eclcloud.ErrResult
}

StartResult is the response from a Start operation. Call its ExtractErr method to determine if the request succeeded or failed.

func Start

func Start(client *eclcloud.ServiceClient, id string) (r StartResult)

Start is the operation responsible for starting a Compute server.

type StopResult

type StopResult struct {
	eclcloud.ErrResult
}

StopResult is the response from Stop operation. Call its ExtractErr method to determine if the request succeeded or failed.

func Stop

func Stop(client *eclcloud.ServiceClient, id string) (r StopResult)

Stop is the operation responsible for stopping a Compute server.

Directories

Path Synopsis
Package testing contains startstop unit tests
Package testing contains startstop unit tests

Jump to

Keyboard shortcuts

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