Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var OperationFromType = func(blockType string) string {
return blockTypes[blockType]
}
OperationFromType translates given block type as defined in multiwatcher into the operation such as destroy-model.
var TypeFromOperation = func(operation string) string { for key, value := range blockTypes { if value == operation { return key } } panic(fmt.Sprintf("unknown operation %v", operation)) }
TypeFromOperation translates given operation string such as destroy-model, remove-object, etc to block type string as defined in multiwatcher.
Functions ¶
func NewSuperBlockCommand ¶
NewSuperBlockCommand creates the block supercommand and registers the subcommands that it supports.
func NewUnblockCommand ¶
NewUnblockCommand returns a new command that removes the block from the specified operation.
func ProcessBlockedError ¶
ProcessBlockedError ensures that correct and user-friendly message is displayed to the user based on the block type.
Types ¶
type BaseBlockCommand ¶
type BaseBlockCommand struct { modelcmd.ModelCommandBase // contains filtered or unexported fields }
BaseBlockCommand is base command for all commands that enable blocks.
func (*BaseBlockCommand) Init ¶
func (c *BaseBlockCommand) Init(args []string) error
Init initializes the command. Satisfying Command interface.
func (*BaseBlockCommand) SetFlags ¶
func (c *BaseBlockCommand) SetFlags(f *gnuflag.FlagSet)
SetFlags implements Command.SetFlags.
type BlockClientAPI ¶
BlockClientAPI defines the client API methods that block command uses.
type BlockInfo ¶
type BlockInfo struct { Operation string `yaml:"block" json:"block"` Enabled bool `yaml:"enabled" json:"enabled"` Message *string `yaml:"message,omitempty" json:"message,omitempty"` }
BlockInfo defines the serialization behaviour of the block information.
type BlockListAPI ¶
BlockListAPI defines the client API methods that block list command uses.
type Command ¶
type Command struct {
cmd.SuperCommand
}
Command is the top-level command wrapping all storage functionality.
type UnblockClientAPI ¶
UnblockClientAPI defines the client API methods that unblock command uses.