aws

package
v2.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2023 License: AGPL-3.0 Imports: 20 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 AWS metadata and API access.

func New

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

New initializes a new AWS Metadata client using instance default credentials. Default region is set up using the AWS imds api.

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 returns 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) 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 returns the UID of the Constellation.

type Logger

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

Logger is a Cloud Logger for AWS. Log messages are collected and periodically flushed to AWS Cloudwatch Logs.

func NewLogger

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

NewLogger creates a new Cloud Logger for AWS.

func (*Logger) Close

func (l *Logger) Close() error

Close flushes the logs a final time and stops the flush loop.

func (*Logger) Disclose

func (l *Logger) Disclose(msg string)

Disclose adds a message to the log queue. The messages are flushed periodically to AWS Cloudwatch Logs.

Jump to

Keyboard shortcuts

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