snapshotstaging

package
v1.57.0 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package snapshotstaging

Package snapshotstaging

Index

Constants

View Source
const (

	// host IP used for PortBinding to your local host
	HostIP = "127.0.0.1"
	// name of the bucket created by default in minIO
	BucketName = "outreach-devenv-snapshots"
	// minIO Access key, set in container env
	AccessKey = "ACCESS_KEY"
	// minIO instance Secret key, set in container env
	SecretKey = "SECRET_KEY"
)

constants used in minIO, hardcoded for convenience

Variables

This section is empty.

Functions

func ConnectToSnapshotStorageByConfig added in v1.57.0

func ConnectToSnapshotStorageByConfig(ctx context.Context, snapshotConfig *SnapshotStorageConnectionConfig) (*s3.Client, error)

Connects to the snapshot storage by config

func GetMinioIPEndpointFromInsideCluster added in v1.57.0

func GetMinioIPEndpointFromInsideCluster(ctx context.Context) (string, error)

Get IP endpoint for minio when accessing from inside the cluster

Types

type MinIOInstance added in v1.57.0

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

MinIOInstance manages MinIO instances running outside the devenv cluster

func NewDefaultMinIO added in v1.57.0

func NewDefaultMinIO(log logrus.FieldLogger) *MinIOInstance

NewDefaultMinIO creates an instance which points to the "Default" minIO instance which is used by snapshot Generate

func NewMinIO added in v1.57.0

func NewMinIO(containerName, hostPort string, log logrus.FieldLogger) *MinIOInstance

NewMinIO creates a minIO instance by container and port. It allows multiple minIO instances side by side as long as they have different container name and port

func (*MinIOInstance) CleanUp added in v1.57.0

func (o *MinIOInstance) CleanUp(ctx context.Context) error

CleanUp destroys minIO container

func (*MinIOInstance) GetClient added in v1.57.0

func (o *MinIOInstance) GetClient(ctx context.Context) (*s3.Client, error)

GetClient creates a connection to the minio storage

func (*MinIOInstance) Provision added in v1.57.0

func (o *MinIOInstance) Provision(ctx context.Context) error

Provision spins up a minIO instance outside devenv cluster

func (*MinIOInstance) UseAsSnapshotStorage added in v1.57.0

func (o *MinIOInstance) UseAsSnapshotStorage(ctx context.Context, b *box.Config) error

UseAsSnapshotStorage mutates the box config to use this instance of minio as snapshot storage

type SnapshotOptions

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

func NewSnapShotOptions

func NewSnapShotOptions(ctx context.Context, log logrus.FieldLogger, b *box.Config) SnapshotOptions

func (*SnapshotOptions) ConnectToRemoteSnapshotStorage added in v1.57.0

func (o *SnapshotOptions) ConnectToRemoteSnapshotStorage() (*s3.Client, error)

Connects to the snapshot storage

type SnapshotStorageConnectionConfig

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

Jump to

Keyboard shortcuts

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