instance

package
v0.0.1-beta.7 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Instance added in v1.1.0

type Instance struct {
	*computepb.Instance
}

Instance handles the instance struct

func (*Instance) GetCost

func (i *Instance) GetCost() int

GetCost returns the instance cost

type Instances added in v1.1.0

type Instances []*Instance

Instances handles the instances struct

func (Instances) GetCost added in v1.1.0

func (i Instances) GetCost() int

GetCost returns the sum of the disks' cost

func (Instances) GetCount added in v1.1.0

func (i Instances) GetCount() int

GetCount returns the number of instances

type Service

type Service interface {
	List(ctx context.Context, filter string) (*Instances, error)
	FilterAbandoned(instances *Instances, days int) error
	Table(instances *Instances) table.Writer
	Close() error
}

Service Implements the instance service

func New

func New(ctx context.Context, project string, options []option.ClientOption) (Service, error)

New returns a new instance service

Jump to

Keyboard shortcuts

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