Documentation
¶
Index ¶
- Constants
- Variables
- func GenerateResourceHash(source atc.Source, resourceType string) string
- func ResourcesDir(suffix string) string
- type Cache
- type EmptyMetadata
- type ErrResourceScriptFailed
- type FetchSource
- type FetchSourceProvider
- type FetchSourceProviderFactory
- type Fetcher
- type FetcherFactory
- type IOConfig
- type InputSource
- type LockDB
- type Metadata
- type Resource
- type ResourceFactory
- type ResourceFactoryFactory
- type ResourceInstance
- func NewBuildResourceInstance(resourceTypeName ResourceType, version atc.Version, source atc.Source, ...) ResourceInstance
- func NewResourceResourceInstance(resourceTypeName ResourceType, version atc.Version, source atc.Source, ...) ResourceInstance
- func NewResourceTypeResourceInstance(resourceTypeName ResourceType, version atc.Version, source atc.Source, ...) ResourceInstance
- type ResourceOptions
- type ResourceType
- type Session
- type TrackerMetadata
- type VersionedSource
Constants ¶
View Source
const GetResourceLockInterval = 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 ¶
Types ¶
type EmptyMetadata ¶
type EmptyMetadata struct{}
func (EmptyMetadata) Env ¶
func (m EmptyMetadata) Env() []string
type ErrResourceScriptFailed ¶
func (ErrResourceScriptFailed) Error ¶
func (err ErrResourceScriptFailed) Error() string
type FetchSource ¶
type FetchSource interface { IsInitialized() (bool, error) LockName() (string, error) VersionedSource() VersionedSource Initialize(signals <-chan os.Signal, ready chan<- struct{}) error }
func NewContainerFetchSource ¶
func NewContainerFetchSource( logger lager.Logger, container worker.Container, volume worker.Volume, resourceOptions ResourceOptions, ) FetchSource
func NewVolumeFetchSource ¶
func NewVolumeFetchSource( logger lager.Logger, volume worker.Volume, worker worker.Worker, resourceOptions ResourceOptions, resourceTypes atc.ResourceTypes, tags atc.Tags, teamID int, session Session, metadata Metadata, imageFetchingDelegate worker.ImageFetchingDelegate, ) FetchSource
type FetchSourceProvider ¶
type FetchSourceProvider interface {
Get() (FetchSource, error)
}
type FetchSourceProviderFactory ¶
type FetchSourceProviderFactory interface { NewFetchSourceProvider( logger lager.Logger, session Session, metadata Metadata, tags atc.Tags, teamID int, resourceTypes atc.ResourceTypes, resourceInstance ResourceInstance, resourceOptions ResourceOptions, imageFetchingDelegate worker.ImageFetchingDelegate, ) 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, resourceInstance ResourceInstance, 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, fetchSourceProviderFactory FetchSourceProviderFactory, ) Fetcher
type FetcherFactory ¶
func NewFetcherFactory ¶
func NewFetcherFactory( db LockDB, clock clock.Clock, ) FetcherFactory
type InputSource ¶
type InputSource interface { Name() worker.ArtifactName Source() worker.ArtifactSource MountPath() string }
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, worker.ArtifactSource, <-chan os.Signal, chan<- struct{}) (VersionedSource, error) Check(atc.Source, atc.Version) ([]atc.Version, error) Container() worker.Container }
func NewResourceForContainer ¶
type ResourceFactory ¶
type ResourceFactory interface { NewResource( logger lager.Logger, id worker.Identifier, metadata worker.Metadata, resourceSpec worker.ContainerSpec, resourceTypes atc.ResourceTypes, imageFetchingDelegate worker.ImageFetchingDelegate, resourceSources map[string]worker.ArtifactSource, ) (Resource, []string, error) NewBuildResource( logger lager.Logger, id worker.Identifier, metadata worker.Metadata, containerSpec worker.ContainerSpec, resourceTypes atc.ResourceTypes, imageFetchingDelegate worker.ImageFetchingDelegate, inputSources []InputSource, outputPaths map[string]string, ) (Resource, []InputSource, error) NewCheckResource( logger lager.Logger, id worker.Identifier, metadata worker.Metadata, resourceSpec worker.ContainerSpec, resourceTypes atc.ResourceTypes, ) (Resource, error) NewCheckResourceForResourceType( logger lager.Logger, id worker.Identifier, metadata worker.Metadata, resourceSpec worker.ContainerSpec, resourceTypes atc.ResourceTypes, ) (Resource, error) }
type ResourceFactoryFactory ¶
type ResourceFactoryFactory interface {
FactoryFor(workerClient worker.Client) ResourceFactory
}
func NewResourceFactoryFactory ¶
func NewResourceFactoryFactory() ResourceFactoryFactory
type ResourceInstance ¶
type ResourceInstance interface { FindOn(lager.Logger, worker.Client) (worker.Volume, bool, error) FindOrCreateOn(lager.Logger, worker.Client) (worker.Volume, error) ResourceCacheIdentifier() worker.ResourceCacheIdentifier }
func NewBuildResourceInstance ¶
func NewBuildResourceInstance( resourceTypeName ResourceType, version atc.Version, source atc.Source, params atc.Params, buildID int, pipelineID int, resourceTypes atc.ResourceTypes, dbResourceCacheFactory dbng.ResourceCacheFactory, ) ResourceInstance
func NewResourceResourceInstance ¶
func NewResourceResourceInstance( resourceTypeName ResourceType, version atc.Version, source atc.Source, params atc.Params, resourceID int, pipelineID int, resourceTypes atc.ResourceTypes, dbResourceCacheFactory dbng.ResourceCacheFactory, ) ResourceInstance
func NewResourceTypeResourceInstance ¶
func NewResourceTypeResourceInstance( resourceTypeName ResourceType, version atc.Version, source atc.Source, params atc.Params, resourceType *dbng.UsedResourceType, pipelineID int, resourceTypes atc.ResourceTypes, dbResourceCacheFactory dbng.ResourceCacheFactory, ) ResourceInstance
type ResourceOptions ¶
type ResourceType ¶
type ResourceType string
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
¶
Directories
¶
Path | Synopsis |
---|---|
This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter
|
This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter |
Click to show internal directories.
Click to hide internal directories.