mirror of
https://github.com/containers/skopeo.git
synced 2025-09-26 12:44:55 +00:00
fix(deps): update module github.com/containers/storage to v1.44.0
Signed-off-by: Renovate Bot <bot@renovateapp.com>
This commit is contained in:
37
vendor/github.com/containers/storage/drivers/driver.go
generated
vendored
37
vendor/github.com/containers/storage/drivers/driver.go
generated
vendored
@@ -8,13 +8,12 @@ import (
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/vbatts/tar-split/tar/storage"
|
||||
|
||||
"github.com/containers/storage/pkg/archive"
|
||||
"github.com/containers/storage/pkg/directory"
|
||||
"github.com/containers/storage/pkg/idtools"
|
||||
digest "github.com/opencontainers/go-digest"
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/vbatts/tar-split/tar/storage"
|
||||
)
|
||||
|
||||
// FsMagic unsigned id of the filesystem in use.
|
||||
@@ -39,7 +38,7 @@ var (
|
||||
ErrLayerUnknown = errors.New("unknown layer")
|
||||
)
|
||||
|
||||
//CreateOpts contains optional arguments for Create() and CreateReadWrite()
|
||||
// CreateOpts contains optional arguments for Create() and CreateReadWrite()
|
||||
// methods.
|
||||
type CreateOpts struct {
|
||||
MountLabel string
|
||||
@@ -53,8 +52,8 @@ type MountOpts struct {
|
||||
// Mount label is the MAC Labels to assign to mount point (SELINUX)
|
||||
MountLabel string
|
||||
// UidMaps & GidMaps are the User Namespace mappings to be assigned to content in the mount point
|
||||
UidMaps []idtools.IDMap // nolint: golint
|
||||
GidMaps []idtools.IDMap // nolint: golint
|
||||
UidMaps []idtools.IDMap //nolint: golint,revive
|
||||
GidMaps []idtools.IDMap //nolint: golint
|
||||
Options []string
|
||||
|
||||
// Volatile specifies whether the container storage can be optimized
|
||||
@@ -279,6 +278,14 @@ func init() {
|
||||
drivers = make(map[string]InitFunc)
|
||||
}
|
||||
|
||||
// MustRegister registers an InitFunc for the driver, or panics.
|
||||
// It is suitable for package’s init() sections.
|
||||
func MustRegister(name string, initFunc InitFunc) {
|
||||
if err := Register(name, initFunc); err != nil {
|
||||
panic(fmt.Sprintf("failed to register containers/storage graph driver %q: %v", name, err))
|
||||
}
|
||||
}
|
||||
|
||||
// Register registers an InitFunc for the driver.
|
||||
func Register(name string, initFunc InitFunc) error {
|
||||
if _, exists := drivers[name]; exists {
|
||||
@@ -405,3 +412,21 @@ func scanPriorDrivers(root string) map[string]bool {
|
||||
}
|
||||
return driversMap
|
||||
}
|
||||
|
||||
// driverPut is driver.Put, but errors are handled either by updating mainErr or just logging.
|
||||
// Typical usage:
|
||||
//
|
||||
// func …(…) (err error) {
|
||||
// …
|
||||
// defer driverPut(driver, id, &err)
|
||||
// }
|
||||
func driverPut(driver ProtoDriver, id string, mainErr *error) {
|
||||
if err := driver.Put(id); err != nil {
|
||||
err = fmt.Errorf("unmounting layer %s: %w", id, err)
|
||||
if *mainErr == nil {
|
||||
*mainErr = err
|
||||
} else {
|
||||
logrus.Errorf(err.Error())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user