mirror of
https://github.com/hashicorp/vault.git
synced 2025-08-06 14:47:01 +02:00
@mitchellh suggested we fork `cli` and switch to that. Since we primarily use the interfaces in `cli`, and the new fork has not changed those, this is (mostly) a drop-in replacement. A small fix will be necessary for Vault Enterprise, I believe.
55 lines
1.7 KiB
Go
55 lines
1.7 KiB
Go
// Copyright (c) HashiCorp, Inc.
|
|
// SPDX-License-Identifier: BUSL-1.1
|
|
|
|
package command
|
|
|
|
import (
|
|
"strings"
|
|
|
|
"github.com/hashicorp/cli"
|
|
)
|
|
|
|
var _ cli.Command = (*PluginRuntimeCommand)(nil)
|
|
|
|
type PluginRuntimeCommand struct {
|
|
*BaseCommand
|
|
}
|
|
|
|
func (c *PluginRuntimeCommand) Synopsis() string {
|
|
return "Interact with Vault plugin runtimes catalog."
|
|
}
|
|
|
|
func (c *PluginRuntimeCommand) Help() string {
|
|
helpText := `
|
|
Usage: vault plugin runtime <subcommand> [options] [args]
|
|
|
|
This command groups subcommands for interacting with Vault's plugin runtimes and the
|
|
plugin runtime catalog. The plugin runtime catalog is divided into types. Currently,
|
|
Vault only supports "container" plugin runtimes. A plugin runtime allows users to
|
|
fine-tune the parameters with which a plugin is executed. For example, you can select
|
|
a different OCI-compatible runtime, or set resource limits. A plugin runtime can
|
|
optionally be referenced during plugin registration. A type must be specified on each call.
|
|
Here are a few examples of the plugin runtime commands.
|
|
|
|
List all available plugin runtimes in the catalog of a particular type:
|
|
|
|
$ vault plugin runtime list -type=container
|
|
|
|
Register a new plugin runtime to the catalog as a particular type:
|
|
|
|
$ vault plugin runtime register -type=container -oci_runtime=my-oci-runtime my-custom-plugin-runtime
|
|
|
|
Get information about a plugin runtime in the catalog listed under a particular type:
|
|
|
|
$ vault plugin runtime info -type=container my-custom-plugin-runtime
|
|
|
|
Please see the individual subcommand help for detailed usage information.
|
|
`
|
|
|
|
return strings.TrimSpace(helpText)
|
|
}
|
|
|
|
func (c *PluginRuntimeCommand) Run(args []string) int {
|
|
return cli.RunResultHelp
|
|
}
|