Documentation ¶
Index ¶
- Constants
- Variables
- func GenerateResourceHash(source atc.Source, resourceType string) string
- func ResourcesDir(suffix string) string
- type ArtifactDestination
- type ArtifactSource
- type Cache
- type CacheIdentifier
- type EmptyMetadata
- type ErrResourceScriptFailed
- type FetchContainerCreator
- type FetchContainerCreatorFactory
- type FetchSource
- func NewContainerFetchSource(logger lager.Logger, container worker.Container, ...) FetchSource
- func NewEmptyFetchSource(logger lager.Logger, worker worker.Worker, cacheIdentifier CacheIdentifier, ...) FetchSource
- func NewVolumeFetchSource(logger lager.Logger, volume worker.Volume, worker worker.Worker, ...) FetchSource
- type FetchSourceProvider
- type FetchSourceProviderFactory
- type Fetcher
- type FetcherFactory
- type IOConfig
- type LockDB
- type Metadata
- type Resource
- type ResourceCacheIdentifier
- func (identifier ResourceCacheIdentifier) CreateOn(logger lager.Logger, workerClient worker.Client) (worker.Volume, error)
- func (identifier ResourceCacheIdentifier) FindOn(logger lager.Logger, workerClient worker.Client) (worker.Volume, bool, error)
- func (identifier ResourceCacheIdentifier) VolumeIdentifier() worker.VolumeIdentifier
- type ResourceOptions
- type ResourceType
- type Session
- type Tracker
- type TrackerFactory
- type TrackerMetadata
- type VersionedSource
Constants ¶
View Source
const GetResourceLeaseInterval = 5 * time.Second
Variables ¶
View Source
var ErrAborted = errors.New("script aborted")
View Source
var ErrFailedToGetLock = errors.New("failed-to-get-lock")
View Source
var ErrInterrupted = errors.New("interrupted")
Functions ¶
func GenerateResourceHash ¶
func ResourcesDir ¶
Types ¶
type ArtifactSource ¶
type ArtifactSource interface { StreamTo(ArtifactDestination) error // VolumeOn returns a Volume object that contains the artifact from the // ArtifactSource which is on a particular Worker. If a volume cannot be found // or a volume manager cannot be found on the worker then it will return // false. VolumeOn(worker.Worker) (worker.Volume, bool, error) }
type CacheIdentifier ¶
type EmptyMetadata ¶
type EmptyMetadata struct{}
func (EmptyMetadata) Env ¶
func (m EmptyMetadata) Env() []string
type ErrResourceScriptFailed ¶
func (ErrResourceScriptFailed) Error ¶
func (err ErrResourceScriptFailed) Error() string
type FetchContainerCreator ¶
type FetchContainerCreatorFactory ¶
type FetchContainerCreatorFactory interface { NewFetchContainerCreator( logger lager.Logger, resourceTypes atc.ResourceTypes, tags atc.Tags, teamID int, session Session, metadata Metadata, imageFetchingDelegate worker.ImageFetchingDelegate, ) FetchContainerCreator }
func NewFetchContainerCreatorFactory ¶
func NewFetchContainerCreatorFactory() FetchContainerCreatorFactory
type FetchSource ¶
type FetchSource interface { IsInitialized() (bool, error) LockName() (string, error) VersionedSource() VersionedSource Initialize(signals <-chan os.Signal, ready chan<- struct{}) error Release(*time.Duration) }
func NewContainerFetchSource ¶
func NewContainerFetchSource( logger lager.Logger, container worker.Container, resourceOptions ResourceOptions, ) FetchSource
func NewEmptyFetchSource ¶
func NewEmptyFetchSource( logger lager.Logger, worker worker.Worker, cacheIdentifier CacheIdentifier, containerCreator FetchContainerCreator, resourceOptions ResourceOptions, ) FetchSource
func NewVolumeFetchSource ¶
func NewVolumeFetchSource( logger lager.Logger, volume worker.Volume, worker worker.Worker, resourceOptions ResourceOptions, containerCreator FetchContainerCreator, ) FetchSource
type FetchSourceProvider ¶
type FetchSourceProvider interface {
Get() (FetchSource, error)
}
type FetchSourceProviderFactory ¶
type FetchSourceProviderFactory interface { NewFetchSourceProvider( logger lager.Logger, session Session, tags atc.Tags, teamID int, resourceTypes atc.ResourceTypes, cacheIdentifier CacheIdentifier, resourceOptions ResourceOptions, containerCreator FetchContainerCreator, ) FetchSourceProvider }
func NewFetchSourceProviderFactory ¶
func NewFetchSourceProviderFactory(workerClient worker.Client) FetchSourceProviderFactory
type Fetcher ¶
type Fetcher interface { Fetch( logger lager.Logger, session Session, tags atc.Tags, teamID int, resourceTypes atc.ResourceTypes, cacheIdentifier CacheIdentifier, metadata Metadata, imageFetchingDelegate worker.ImageFetchingDelegate, resourceOptions ResourceOptions, signals <-chan os.Signal, ready chan<- struct{}, ) (FetchSource, error) }
func NewFetcher ¶
func NewFetcher( clock clock.Clock, db LockDB, fetchContainerCreatorFactory FetchContainerCreatorFactory, fetchSourceProviderFactory FetchSourceProviderFactory, ) Fetcher
type FetcherFactory ¶
func NewFetcherFactory ¶
func NewFetcherFactory( db LockDB, clock clock.Clock, ) FetcherFactory
type Resource ¶
type Resource interface { Get(worker.Volume, IOConfig, atc.Source, atc.Params, atc.Version, <-chan os.Signal, chan<- struct{}) (VersionedSource, error) Put(IOConfig, atc.Source, atc.Params, ArtifactSource, <-chan os.Signal, chan<- struct{}) (VersionedSource, error) Check(atc.Source, atc.Version) ([]atc.Version, error) Release(*time.Duration) }
func NewResource ¶
type ResourceCacheIdentifier ¶
type ResourceCacheIdentifier struct { Type ResourceType Version atc.Version Source atc.Source Params atc.Params }
func (ResourceCacheIdentifier) VolumeIdentifier ¶
func (identifier ResourceCacheIdentifier) VolumeIdentifier() worker.VolumeIdentifier
type ResourceOptions ¶
type ResourceType ¶
type ResourceType string
type Tracker ¶
type Tracker interface { Init(lager.Logger, Metadata, Session, ResourceType, atc.Tags, int, atc.ResourceTypes, worker.ImageFetchingDelegate) (Resource, error) InitWithSources(lager.Logger, Metadata, Session, ResourceType, atc.Tags, int, map[string]ArtifactSource, atc.ResourceTypes, worker.ImageFetchingDelegate) (Resource, []string, error) }
type TrackerFactory ¶
func NewTrackerFactory ¶
func NewTrackerFactory() TrackerFactory
type TrackerMetadata ¶
func (TrackerMetadata) Env ¶
func (m TrackerMetadata) Env() []string
type VersionedSource ¶
type VersionedSource interface { Version() atc.Version Metadata() []atc.MetadataField StreamOut(string) (io.ReadCloser, error) StreamIn(string, io.Reader) error Volume() worker.Volume }
func NewGetVersionedSource ¶
func NewGetVersionedSource(volume worker.Volume, version atc.Version, metadata []atc.MetadataField) VersionedSource
Source Files ¶
- cache.go
- cache_identifier.go
- container_fetch_source.go
- empty_fetch_source.go
- fetch_container_creator.go
- fetch_source_provider.go
- fetcher.go
- fetcher_factory.go
- resource.go
- resource_check.go
- resource_in.go
- resource_out.go
- run_script.go
- tracker.go
- tracker_metadata.go
- versioned_source.go
- volume_fetch_source.go
Directories ¶
Path | Synopsis |
---|---|
This file was generated by counterfeiter
|
This file was generated by counterfeiter |
Click to show internal directories.
Click to hide internal directories.