gcloud

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: MPL-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultTokenSource

func DefaultTokenSource(ctx context.Context) (oauth2.TokenSource, error)

func GetToken

func GetToken(ctx context.Context) ([]byte, error)

func ParseToken

func ParseToken(tok string) (*oauth2.Token, error)

func SetupEnvJson added in v0.0.3

func SetupEnvJson(ctx context.Context) error

Types

type Client

type Client struct {
	InstanceClient *compute.InstancesClient

	Project string
	Zone    string
}

func NewClient

func NewClient(ctx context.Context, project, zone string, opts ...option.ClientOption) (*Client, error)

func (*Client) Close

func (c *Client) Close() error

func (*Client) Create

func (c *Client) Create(ctx context.Context, instance *computepb.Instance) error

func (*Client) Delete

func (c *Client) Delete(ctx context.Context, name string) error

func (*Client) Get

func (c *Client) Get(ctx context.Context, name string) (*computepb.Instance, error)

func (*Client) Init

func (c *Client) Init(ctx context.Context) error

func (*Client) Start

func (c *Client) Start(ctx context.Context, name string) error

func (*Client) Status

func (c *Client) Status(ctx context.Context, name string) (client.Status, error)

func (*Client) Stop

func (c *Client) Stop(ctx context.Context, name string, async bool) error

Jump to

Keyboard shortcuts

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