github.com/pf-qiu/concourse/v6@v6.7.3-0.20201207032516-1f455d73275f/atc/worker/artifact_destination.go (about) 1 package worker 2 3 import ( 4 "context" 5 "io" 6 7 "github.com/concourse/baggageclaim" 8 ) 9 10 //go:generate counterfeiter . ArtifactDestination 11 12 // Destination is the inverse of Source. This interface allows 13 // the receiving end to determine the location of the data, e.g. based on a 14 // task's input configuration. 15 type ArtifactDestination interface { 16 // StreamIn is called with a destination directory and the tar stream to 17 // expand into the destination directory. 18 StreamIn(context.Context, string, baggageclaim.Encoding, io.Reader) error 19 20 GetStreamInP2pUrl(ctx context.Context, path string) (string, error) 21 }