client

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	WaitOp = (*compute.Operation).Wait
	NextIt = (*compute.InstanceIterator).Next
)

Functions

This section is empty.

Types

type GcpCli

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

func NewGcpCli

func NewGcpCli(ctx context.Context, cfg *config.Config) (*GcpCli, error)

func (GcpCli) Client

func (g GcpCli) Client() ClientInterface

func (GcpCli) Config

func (g GcpCli) Config() *config.Config

func (*GcpCli) CreateInstance

func (g *GcpCli) CreateInstance(ctx context.Context, spec *spec.RunnerSpec) (*computepb.Instance, error)

func (*GcpCli) DeleteInstance

func (g *GcpCli) DeleteInstance(ctx context.Context, instance string) error

func (*GcpCli) GetInstance

func (g *GcpCli) GetInstance(ctx context.Context, instanceName string) (*computepb.Instance, error)

func (*GcpCli) ListDescribedInstances

func (g *GcpCli) ListDescribedInstances(ctx context.Context, poolID string) ([]*computepb.Instance, error)

func (*GcpCli) SetClient

func (g *GcpCli) SetClient(client ClientInterface)

func (*GcpCli) SetConfig

func (g *GcpCli) SetConfig(cfg *config.Config)

func (*GcpCli) StartInstance

func (g *GcpCli) StartInstance(ctx context.Context, instance string) error

func (*GcpCli) StopInstance

func (g *GcpCli) StopInstance(ctx context.Context, instance string) error

type MockGcpClient

type MockGcpClient struct {
	mock.Mock
}

MockGcpClient is a mock of the ClientInterface

func (*MockGcpClient) Delete

func (*MockGcpClient) Get

func (*MockGcpClient) Insert

func (*MockGcpClient) List

func (*MockGcpClient) Start

func (*MockGcpClient) Stop

Jump to

Keyboard shortcuts

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