gcp

package
v0.0.0-...-1d9db5a Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2022 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// ProjectID is the name of the project to query
	ProjectID string
	// Environment tag to filter by
	Environment string
	// Role tag to filter by
	Role string
}

Config is the configuration required to talk to GCP APIs to fetch a list of nodes

type Members

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

Members of a GCP group.

func NewGCP

func NewGCP(cfg *Config) (*Members, error)

NewGCP returns the Members matching the cfg.

func (*Members) GetInstances

func (m *Members) GetInstances() ([]cloud.Instance, error)

GetInstances will return the gcp etcd instances

func (*Members) GetLocalIP

func (m *Members) GetLocalIP() (string, error)

GetLocalIP returns the same value as the GetLocalInstance() endpoint.

func (*Members) GetLocalInstance

func (m *Members) GetLocalInstance() (cloud.Instance, error)

GetLocalInstance will get the gcp instance etcd bootstrap is running on

Jump to

Keyboard shortcuts

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