-
Notifications
You must be signed in to change notification settings - Fork 244
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2156 from nalind/config-disable-partial-pull
Disable partial pulls (zstd:chunked) by default
- Loading branch information
Showing
6 changed files
with
70 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package main | ||
|
||
import ( | ||
"fmt" | ||
|
||
"github.com/containers/storage" | ||
"github.com/containers/storage/pkg/mflag" | ||
"github.com/containers/storage/types" | ||
) | ||
|
||
func config(flags *mflag.FlagSet, action string, m storage.Store, args []string) (int, error) { | ||
options, err := types.DefaultStoreOptions() | ||
if err != nil { | ||
return 1, fmt.Errorf("default: %+v", err) | ||
} | ||
if len(args) > 0 { | ||
if err = types.ReloadConfigurationFileIfNeeded(args[0], &options); err != nil { | ||
return 1, fmt.Errorf("reload: %+v", err) | ||
} | ||
} | ||
return outputJSON(options) | ||
} | ||
|
||
func init() { | ||
commands = append(commands, command{ | ||
names: []string{"config"}, | ||
usage: "Print storage library configuration as JSON", | ||
minArgs: 0, | ||
maxArgs: 1, | ||
optionsHelp: "[configurationFile]", | ||
action: config, | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
## containers-storage-config 1 "November 2024" | ||
|
||
## NAME | ||
containers-storage config - Output the configuration for the storage library | ||
|
||
## SYNOPSIS | ||
**containers-storage** **config** [configurationFile] | ||
|
||
## DESCRIPTION | ||
Reads and outputs the current configuration for the storage library, or the | ||
current configuration with the contents of a specified configuration file | ||
loaded in, in a JSON format. | ||
|
||
## EXAMPLE | ||
**containers-storage config** | ||
|
||
## SEE ALSO | ||
containers-storage-version(1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters