Documentation ¶
Overview ¶
Package snapshotstaging
Package snapshotstaging
Index ¶
Constants ¶
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
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
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
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
}