Documentation ¶
Index ¶
- Constants
- Variables
- func ResourcesDir(suffix string) string
- type EmptyMetadata
- type ErrResourceScriptFailed
- type FetchSource
- type FetchSourceProvider
- type FetchSourceProviderFactory
- type Fetcher
- type FetcherFactory
- type IOConfig
- type Metadata
- type Resource
- type ResourceFactory
- type ResourceFactoryFactory
- type ResourceInstance
- 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 ¶
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 { LockName() (string, error) Find() (VersionedSource, bool, error) Create(signals <-chan os.Signal, ready chan<- struct{}) (VersionedSource, error) }
func NewResourceInstanceFetchSource ¶
func NewResourceInstanceFetchSource( logger lager.Logger, resourceCache *db.UsedResourceCache, resourceInstance ResourceInstance, worker worker.Worker, resourceTypes creds.VersionedResourceTypes, tags atc.Tags, teamID int, session Session, metadata Metadata, imageFetchingDelegate worker.ImageFetchingDelegate, dbResourceCacheFactory db.ResourceCacheFactory, ) 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 creds.VersionedResourceTypes, resourceInstance ResourceInstance, imageFetchingDelegate worker.ImageFetchingDelegate, ) FetchSourceProvider }
func NewFetchSourceProviderFactory ¶
func NewFetchSourceProviderFactory( workerClient worker.Client, dbResourceCacheFactory db.ResourceCacheFactory, ) FetchSourceProviderFactory
type Fetcher ¶
type Fetcher interface { Fetch( logger lager.Logger, session Session, tags atc.Tags, teamID int, resourceTypes creds.VersionedResourceTypes, resourceInstance ResourceInstance, metadata Metadata, imageFetchingDelegate worker.ImageFetchingDelegate, signals <-chan os.Signal, ready chan<- struct{}, ) (VersionedSource, error) }
func NewFetcher ¶
func NewFetcher( clock clock.Clock, lockFactory lock.LockFactory, fetchSourceProviderFactory FetchSourceProviderFactory, ) Fetcher
type FetcherFactory ¶
func NewFetcherFactory ¶
func NewFetcherFactory( lockFactory lock.LockFactory, clock clock.Clock, dbResourceCacheFactory db.ResourceCacheFactory, ) 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, <-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, signals <-chan os.Signal, user db.ResourceUser, owner db.ContainerOwner, metadata db.ContainerMetadata, containerSpec worker.ContainerSpec, resourceTypes creds.VersionedResourceTypes, imageFetchingDelegate worker.ImageFetchingDelegate, ) (Resource, error) }
type ResourceFactoryFactory ¶
type ResourceFactoryFactory interface {
FactoryFor(workerClient worker.Client) ResourceFactory
}
func NewResourceFactoryFactory ¶
func NewResourceFactoryFactory() ResourceFactoryFactory
type ResourceInstance ¶
type ResourceInstance interface { Source() atc.Source Params() atc.Params Version() atc.Version ResourceType() ResourceType ResourceUser() db.ResourceUser ContainerOwner() db.ContainerOwner LockName(string) (string, error) FindOn(lager.Logger, worker.Worker) (worker.Volume, bool, error) }
func NewResourceInstance ¶
func NewResourceInstance( resourceTypeName ResourceType, version atc.Version, source atc.Source, params atc.Params, resourceUser db.ResourceUser, containerOwner db.ContainerOwner, resourceTypes creds.VersionedResourceTypes, dbResourceCacheFactory db.ResourceCacheFactory, ) ResourceInstance
type ResourceType ¶
type ResourceType string
type Session ¶
type Session struct {
Metadata db.ContainerMetadata
}
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 ¶
Click to show internal directories.
Click to hide internal directories.