coc

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: May 11, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package coc implements the cloudlist `vm` command capability for Huawei Cloud via COC (Cloud Operations Center) script jobs. UniAgent must be installed on the target ECS for executions to land.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Driver

type Driver struct {
	Cred           auth.Credential
	Regions        []string
	DomainID       string
	Client         *api.Client
	ProjectCatalog *api.ProjectCatalog
	// contains filtered or unexported fields
}

func (*Driver) Execute

func (d *Driver) Execute(ctx context.Context, instanceID, command string) (schema.CommandResult, error)

Execute creates a temporary COC script, executes it on one ECS instance, and polls until the execution reaches a terminal state. Output is aggregated from the per-instance execution log.

func (*Driver) ExecuteOS added in v0.3.3

func (d *Driver) ExecuteOS(ctx context.Context, instanceID, osType, command string) (schema.CommandResult, error)

ExecuteOS is Execute with an explicit target OS hint. Supported script types mirror Huawei COC: Linux uses SHELL and Windows uses BAT.

Jump to

Keyboard shortcuts

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