gce

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package gce provides an in-memory mock implementation of Google Compute Engine.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mock

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

Mock is an in-memory mock implementation of Google Compute Engine.

func New

func New(opts *config.Options) *Mock

New creates a new GCE mock.

func (*Mock) DescribeInstances

func (m *Mock) DescribeInstances(_ context.Context, instanceIDs []string, filters []driver.DescribeFilter) ([]driver.Instance, error)

func (*Mock) ModifyInstance

func (m *Mock) ModifyInstance(_ context.Context, instanceID string, input driver.ModifyInstanceInput) error

func (*Mock) RebootInstances

func (m *Mock) RebootInstances(ctx context.Context, instanceIDs []string) error

func (*Mock) RunInstances

func (m *Mock) RunInstances(ctx context.Context, cfg driver.InstanceConfig, count int) ([]driver.Instance, error)

func (*Mock) SetMonitoring

func (m *Mock) SetMonitoring(mon mondriver.Monitoring)

SetMonitoring sets the monitoring backend for auto-metric generation.

func (*Mock) StartInstances

func (m *Mock) StartInstances(ctx context.Context, instanceIDs []string) error

func (*Mock) StopInstances

func (m *Mock) StopInstances(ctx context.Context, instanceIDs []string) error

func (*Mock) TerminateInstances

func (m *Mock) TerminateInstances(ctx context.Context, instanceIDs []string) error

Jump to

Keyboard shortcuts

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