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"
|
2022-02-01 05:42:15 +00:00
|
|
|
"github.com/moby/buildkit/util/compression"
|
2017-07-10 20:03:38 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
type Exporter interface {
|
|
|
|
Resolve(context.Context, map[string]string) (ExporterInstance, error)
|
|
|
|
}
|
|
|
|
|
|
|
|
type ExporterInstance interface {
|
2017-07-11 00:56:04 +00:00
|
|
|
Name() string
|
2021-10-05 06:43:22 +00:00
|
|
|
Config() Config
|
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
|
|
|
}
|
2021-10-05 06:43:22 +00:00
|
|
|
|
|
|
|
type Config struct {
|
2022-02-01 05:42:15 +00:00
|
|
|
Compression compression.Config
|
2021-10-05 06:43:22 +00:00
|
|
|
}
|