artifacts

package
v1.1.43 Latest Latest
Warning

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

Go to latest
Published: May 29, 2024 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultArtifactsURL

func DefaultArtifactsURL(env terra.Environment) string

DefaultArtifactsURL returns the artifacts base URL for this environment's default cluster. If the environment spans multiple clusters, artifacts for the releases outside the default cluster will not be found at this URL

Types

type Artifacts

type Artifacts interface {
	NewManager(artifactType Type, options Options) Manager
}

func New

func New(bucketFactory api.BucketFactory) Artifacts

type Location

type Location struct {
	FilesystemPath  string `yaml:"path,omitempty" json:"url,omitempty"`
	CloudConsoleURL string `yaml:"url,omitempty" json:"path,omitempty"`
}

type Manager

type Manager interface {
	// Writer returns a writer that can be used to write artifact data to the given destination(s)
	// Note: Callers are responsible for closing the writer once data has been written!
	Writer(release terra.Release, path string) (io.WriteCloser, error)

	// Location returns links to an individual artifact path.
	// Either of the fields in the returned Links struct may be empty, depending on how the Manager is configured.
	// For example if the Manager is not configured to upload artifacts to GCS, the CloudConsoleLink field will be empty
	Location(release terra.Release, path string) Location

	// BaseLocationForRelease returns links to the base directory/path for all artifacts for this Release
	// Either of the fields in the returned Links struct may be empty, depending on how the manager is configured
	// For example if the Manager is not configured to upload artifacts to GCS, the CloudConsoleLink field will be empty
	BaseLocationForRelease(release terra.Release) Location
}

Manager is for writing operational artifacts to standard locations on the local filesystem or a GCS bucket

func NewManager

func NewManager(artifactType Type, bucketFactory api.BucketFactory, options Options) Manager

type Options

type Options struct {
	// Dir local directory where operational artifacts should be written
	Dir string
	// Upload if true, upload exported operational artifacts to the release's cluster artifact bucket
	Upload bool
}

type Type

type Type int64
const (
	ContainerLog Type = iota
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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