outboundAdapters

package
v0.6.6 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrKeyNotExists is returned when the key is not present in the object storage.
	ErrKeyNotExists = errors.New("key is not present in bucket")
)

Functions

This section is empty.

Types

type DynamoDBAdapter

type DynamoDBAdapter struct {
	Client *dynamodb.Client
	// contains filtered or unexported fields
}

func CreateDynamoDBAdapter

func CreateDynamoDBAdapter() *DynamoDBAdapter

CreateDynamoDBAdapter creates 2 separate dynamoDB clients - one for healthcheck and another for general usage. These 2 dynamoDB clients are then used to construct a DynamoDBAdapter instance. Returns the DynamoDBAdapter instance.

func (*DynamoDBAdapter) DeleteLockFile

func (d *DynamoDBAdapter) DeleteLockFile(ctx context.Context, projectName, clusterId string, keyFormat string) error

DeleteLockFile deletes terraform state lock file (related to the given cluster), from DynamoDB.

func (*DynamoDBAdapter) Healthcheck

func (d *DynamoDBAdapter) Healthcheck() error

Healthcheck function checks whether the DynamoDB table for Terraform state locking exists or not.

type MinIOAdapter

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

func CreateMinIOAdapter

func CreateMinIOAdapter() *MinIOAdapter

CreateMinIOAdapter creates 2 MinIO clients first - one for healthcheck and one for general purpose. A MinIOAdapter instance is then constructed using those 2 clients and returned.

func (*MinIOAdapter) DeleteStateFile

func (m *MinIOAdapter) DeleteStateFile(ctx context.Context, projectName, clusterId string, keyFormat string) error

DeleteStateFile deletes terraform state file (related to the given cluster), from MinIO bucket.

func (*MinIOAdapter) Healthcheck

func (m *MinIOAdapter) Healthcheck() error

Healthcheck checks whether the MinIO bucket exists or not.

func (*MinIOAdapter) Stat added in v0.4.2

func (m *MinIOAdapter) Stat(ctx context.Context, projectName, clusterId, keyFormat string) error

Stat checks whether the given object exists in storage.

Jump to

Keyboard shortcuts

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