gcp

package
v2.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2022 License: AGPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cloud added in v2.3.0

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

Cloud provides GCP cloud metadata information and API access.

func New

func New(ctx context.Context) (cloud *Cloud, err error)

New creates and initializes Cloud. The Close method should be called when Cloud is no longer needed.

func (*Cloud) Close added in v2.3.0

func (c *Cloud) Close()

Close closes all connections to the GCP API server.

func (*Cloud) GetLoadBalancerEndpoint added in v2.3.0

func (c *Cloud) GetLoadBalancerEndpoint(ctx context.Context) (string, error)

GetLoadBalancerEndpoint returns the endpoint of the load balancer.

func (*Cloud) InitSecretHash added in v2.3.0

func (c *Cloud) InitSecretHash(ctx context.Context) ([]byte, error)

InitSecretHash retrieves the InitSecretHash of the current instance.

func (*Cloud) List added in v2.3.0

func (c *Cloud) List(ctx context.Context) ([]metadata.InstanceMetadata, error)

List retrieves all instances belonging to the current constellation.

func (*Cloud) ProviderID added in v2.3.0

func (c *Cloud) ProviderID(ctx context.Context) (string, error)

ProviderID returns the providerID of the current instance.

func (*Cloud) Self added in v2.3.0

Self retrieves the current instance.

func (*Cloud) UID added in v2.3.0

func (c *Cloud) UID(ctx context.Context) (string, error)

UID retrieves the UID of the constellation.

type Logger

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

Logger logs to GCP cloud logging. Do not use to log sensitive information.

func NewLogger

func NewLogger(ctx context.Context, logName string) (*Logger, error)

NewLogger creates a new Cloud Logger for GCP. https://cloud.google.com/logging/docs/setup/go

func (*Logger) Close

func (l *Logger) Close() error

Close waits for all buffer to be written.

func (*Logger) Disclose

func (l *Logger) Disclose(msg string)

Disclose stores log information in GCP Cloud Logging! Do **NOT** log sensitive information!

Jump to

Keyboard shortcuts

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