fallbackstorage

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Fallback

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

Fallback is a flow.ArtifactReadStorage implementation that combines the storage of two implementations, a primary and secondary. If the primary storage returns an error the secondary storage is invoked.

func New

func New(primary flow.ArtifactReadStorage, secondary flow.ArtifactReadStorage, tracer tracing.Tracer) *Fallback

func (*Fallback) ArtifactExists

func (f *Fallback) ArtifactExists(ctx context.Context, service, artifactID string) (bool, error)

func (*Fallback) ArtifactPaths

func (f *Fallback) ArtifactPaths(ctx context.Context, service string, environment string, branch string, artifactID string) (specPath string, resourcesPath string, close func(context.Context), err error)

func (*Fallback) ArtifactSpecification

func (f *Fallback) ArtifactSpecification(ctx context.Context, service string, artifactID string) (artifact.Spec, error)

func (*Fallback) ArtifactSpecifications

func (f *Fallback) ArtifactSpecifications(ctx context.Context, service string, n int) ([]artifact.Spec, error)

ArtifactSpecifications takes as many as can be found in primary and the rest from secondary

func (*Fallback) LatestArtifactPaths

func (f *Fallback) LatestArtifactPaths(ctx context.Context, service string, environment string, branch string) (specPath string, resourcesPath string, close func(context.Context), err error)

func (*Fallback) LatestArtifactSpecification

func (f *Fallback) LatestArtifactSpecification(ctx context.Context, service string, branch string) (artifact.Spec, error)

Jump to

Keyboard shortcuts

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