2017-07-10 20:03:38 +00:00
|
|
|
package exporter
|
|
|
|
|
|
|
|
import (
|
2018-01-16 22:30:10 +00:00
|
|
|
"context"
|
|
|
|
|
2017-07-10 20:03:38 +00:00
|
|
|
"github.com/moby/buildkit/cache"
|
|
|
|
)
|
|
|
|
|
|
|
|
type Exporter interface {
|
|
|
|
Resolve(context.Context, map[string]string) (ExporterInstance, error)
|
|
|
|
}
|
|
|
|
|
|
|
|
type ExporterInstance interface {
|
2017-07-11 00:56:04 +00:00
|
|
|
Name() string
|
2020-06-30 01:06:02 +00:00
|
|
|
Export(ctx context.Context, src Source, sessionID string) (map[string]string, error)
|
2018-07-10 18:05:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type Source struct {
|
|
|
|
Ref cache.ImmutableRef
|
|
|
|
Refs map[string]cache.ImmutableRef
|
|
|
|
Metadata map[string][]byte
|
2017-07-10 20:03:38 +00:00
|
|
|
}
|