source

package
v0.0.0-...-b35638e Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2017 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DockerImageScheme = "docker-image"
	GitScheme         = "git"
	LocalScheme       = "local"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type GitIdentifier

type GitIdentifier struct {
	Remote     string
	Ref        string
	Subdir     string
	KeepGitDir bool
}

func NewGitIdentifier

func NewGitIdentifier(remoteURL string) (*GitIdentifier, error)

func (*GitIdentifier) ID

func (i *GitIdentifier) ID() string

type Identifier

type Identifier interface {
	ID() string // until sources are in process this string comparison could be avoided
}

func FromString

func FromString(s string) (Identifier, error)

type ImageIdentifier

type ImageIdentifier struct {
	Reference reference.Spec
}

func NewImageIdentifier

func NewImageIdentifier(str string) (*ImageIdentifier, error)

func (*ImageIdentifier) ID

func (_ *ImageIdentifier) ID() string

type LocalIdentifier

type LocalIdentifier struct {
	Name            string
	SessionID       string
	IncludePatterns []string
}

func NewLocalIdentifier

func NewLocalIdentifier(str string) (*LocalIdentifier, error)

func (*LocalIdentifier) ID

func (_ *LocalIdentifier) ID() string

type Manager

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

func NewManager

func NewManager() (*Manager, error)

func (*Manager) Register

func (sm *Manager) Register(src Source)

func (*Manager) Resolve

func (sm *Manager) Resolve(ctx context.Context, id Identifier) (SourceInstance, error)

type Source

type Source interface {
	ID() string
	Resolve(ctx context.Context, id Identifier) (SourceInstance, error)
}

type SourceInstance

type SourceInstance interface {
	CacheKey(ctx context.Context) (string, error)
	Snapshot(ctx context.Context) (cache.ImmutableRef, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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