Documentation
¶
Overview ¶
package ctl contains all pilosa subcommands other than 'server'. These are generally administration, testing, and debugging tools.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BackupCommand ¶
type BackupCommand struct {
// Destination host and port.
Host string
// Name of the index, frame, view to backup.
Index string
Frame string
View string
// Output file to write to.
Path string
// Standard input/output
*pilosa.CmdIO
}
BackupCommand represents a command for backing up a view.
func NewBackupCommand ¶
func NewBackupCommand(stdin io.Reader, stdout, stderr io.Writer) *BackupCommand
NewBackupCommand returns a new instance of BackupCommand.
type BenchCommand ¶
type BenchCommand struct {
// Destination host and port.
Host string
// Name of the index & frame to execute against.
Index string
Frame string
// Type of operation and number to execute.
Op string
N int
// Standard input/output
*pilosa.CmdIO
}
BenchCommand represents a command for benchmarking index operations.
func NewBenchCommand ¶
func NewBenchCommand(stdin io.Reader, stdout, stderr io.Writer) *BenchCommand
NewBenchCommand returns a new instance of BenchCommand.
type CheckCommand ¶
type CheckCommand struct {
// Data file paths.
Paths []string
// Standard input/output
*pilosa.CmdIO
}
CheckCommand represents a command for performing consistency checks on data files.
func NewCheckCommand ¶
func NewCheckCommand(stdin io.Reader, stdout, stderr io.Writer) *CheckCommand
NewCheckCommand returns a new instance of CheckCommand.
type ConfigCommand ¶
ConfigCommand represents a command for printing a default config.
func NewConfigCommand ¶
func NewConfigCommand(stdin io.Reader, stdout, stderr io.Writer) *ConfigCommand
NewConfigCommand returns a new instance of ConfigCommand.
type ExportCommand ¶
type ExportCommand struct {
// Remote host and port.
Host string
// Name of the index & frame to export from.
Index string
Frame string
// Filename to export to.
Path string
// Standard input/output
*pilosa.CmdIO
}
ExportCommand represents a command for bulk exporting data from a server.
func NewExportCommand ¶
func NewExportCommand(stdin io.Reader, stdout, stderr io.Writer) *ExportCommand
NewExportCommand returns a new instance of ExportCommand.
type ImportCommand ¶
type ImportCommand struct {
// Destination host and port.
Host string `json:"host"`
// Name of the index & frame to import into.
Index string `json:"index"`
Frame string `json:"frame"`
// Filenames to import from.
Paths []string `json:"paths"`
// Size of buffer used to chunk import.
BufferSize int `json:"bufferSize"`
// Reusable client.
Client *pilosa.Client `json:"-"`
// Standard input/output
*pilosa.CmdIO
}
ImportCommand represents a command for bulk importing data.
func NewImportCommand ¶
func NewImportCommand(stdin io.Reader, stdout, stderr io.Writer) *ImportCommand
NewImportCommand returns a new instance of ImportCommand.
func (*ImportCommand) Run ¶
func (cmd *ImportCommand) Run(ctx context.Context) error
Run executes the main program execution.
func (*ImportCommand) String ¶
func (cmd *ImportCommand) String() string
type InspectCommand ¶
type InspectCommand struct {
// Path to data file
Path string
// Standard input/output
*pilosa.CmdIO
}
InspectCommand represents a command for inspecting fragment data files.
func NewInspectCommand ¶
func NewInspectCommand(stdin io.Reader, stdout, stderr io.Writer) *InspectCommand
NewInspectCommand returns a new instance of InspectCommand.
type RestoreCommand ¶
type RestoreCommand struct {
// Destination host and port.
Host string
// Name of the index & frame to backup.
Index string
Frame string
View string
// Import file to read from.
Path string
// Standard input/output
*pilosa.CmdIO
}
RestoreCommand represents a command for restoring a frame from a backup.
func NewRestoreCommand ¶
func NewRestoreCommand(stdin io.Reader, stdout, stderr io.Writer) *RestoreCommand
NewRestoreCommand returns a new instance of RestoreCommand.
type SortCommand ¶
SortCommand represents a command for sorting import data.
func NewSortCommand ¶
func NewSortCommand(stdin io.Reader, stdout, stderr io.Writer) *SortCommand
NewSortCommand returns a new instance of SortCommand.