snapshot

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: 40 Imported by: 0

Documentation

Overview

Package snapshot This file is the entrypoint for the snapshot CLI command for devenv.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCmdSnapshot

func NewCmdSnapshot(log logrus.FieldLogger) *cli.Command

Types

type LoadLockfileOptions added in v1.51.0

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

type Options

type Options struct {

	// KubernetesVersion is the version of Kubernetes to use when generating snapshots
	KubernetesVersion string
	// contains filtered or unexported fields
}

func NewOptions

func NewOptions(log logrus.FieldLogger, b *box.Config) (*Options, error)

func (*Options) CreateSnapshot

func (o *Options) CreateSnapshot(ctx context.Context) (string, error)

func (*Options) Generate

func (o *Options) Generate(ctx context.Context, s *box.SnapshotGenerateConfig,
	skipUpload bool, channel box.SnapshotLockChannel, targetName string) error

Generate does spin up devenv, deploys applications and generates a snapshots for all targets, and finally and uploads them. If env UPLOAD_TO_LOCAL_SNAPSHOT_STORAGE is defined, then snapshots are stored instead in a local minIO instance, to be validated.

func (*Options) LoadLockFile added in v1.51.0

func (o *Options) LoadLockFile(ctx context.Context, options LoadLockfileOptions) (*box.SnapshotLock, error)

LoadLockFile reads lock file from target s3c

func (*Options) Upload added in v1.51.0

func (o *Options) Upload(ctx context.Context,
	s *box.SnapshotGenerateConfig,
	channel box.SnapshotLockChannel, targetName string,
	destS3client *s3.Client) error

Uploads file from local minIO to S3, effectively publishing the snapshots

Jump to

Keyboard shortcuts

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