pilosa: github.com/pilosa/pilosa/ctl Index | Files

package ctl

import "github.com/pilosa/pilosa/ctl"

package ctl contains all pilosa subcommands other than 'server'. These are generally administration, testing, and debugging tools.

Index

Package Files

check.go common.go config.go doc.go export.go generate_config.go import.go inspect.go server.go

func BuildServerFlags Uses

func BuildServerFlags(cmd *cobra.Command, srv *server.Command)

BuildServerFlags attaches a set of flags to the command for a server instance.

func SetTLSConfig Uses

func SetTLSConfig(flags *pflag.FlagSet, certificatePath *string, certificateKeyPath *string, caCertPath *string, skipVerify *bool, enableClientVerification *bool)

SetTLSConfig creates common TLS flags

type CheckCommand Uses

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 Uses

func NewCheckCommand(stdin io.Reader, stdout, stderr io.Writer) *CheckCommand

NewCheckCommand returns a new instance of CheckCommand.

func (*CheckCommand) Run Uses

func (cmd *CheckCommand) Run(_ context.Context) error

Run executes the check command.

type CommandWithTLSSupport Uses

type CommandWithTLSSupport interface {
    TLSHost() string
    TLSConfiguration() server.TLSConfig
    Logger() *log.Logger
}

CommandWithTLSSupport is the interface for commands which has TLS settings

type ConfigCommand Uses

type ConfigCommand struct {
    *pilosa.CmdIO
    Config *server.Config
}

ConfigCommand represents a command for printing a default config.

func NewConfigCommand Uses

func NewConfigCommand(stdin io.Reader, stdout, stderr io.Writer) *ConfigCommand

NewConfigCommand returns a new instance of ConfigCommand.

func (*ConfigCommand) Run Uses

func (cmd *ConfigCommand) Run(_ context.Context) error

Run prints out the default config.

type ExportCommand Uses

type ExportCommand struct {
    // Remote host and port.
    Host string

    // Name of the index & field to export from.
    Index string
    Field string

    // Filename to export to.
    Path string

    // Standard input/output
    *pilosa.CmdIO

    TLS server.TLSConfig
}

ExportCommand represents a command for bulk exporting data from a server.

func NewExportCommand Uses

func NewExportCommand(stdin io.Reader, stdout, stderr io.Writer) *ExportCommand

NewExportCommand returns a new instance of ExportCommand.

func (*ExportCommand) Run Uses

func (cmd *ExportCommand) Run(ctx context.Context) error

Run executes the export.

func (*ExportCommand) TLSConfiguration Uses

func (cmd *ExportCommand) TLSConfiguration() server.TLSConfig

func (*ExportCommand) TLSHost Uses

func (cmd *ExportCommand) TLSHost() string

type GenerateConfigCommand Uses

type GenerateConfigCommand struct {
    *pilosa.CmdIO
}

GenerateConfigCommand represents a command for printing a default config.

func NewGenerateConfigCommand Uses

func NewGenerateConfigCommand(stdin io.Reader, stdout, stderr io.Writer) *GenerateConfigCommand

NewGenerateConfigCommand returns a new instance of GenerateConfigCommand.

func (*GenerateConfigCommand) Run Uses

func (cmd *GenerateConfigCommand) Run(_ context.Context) error

Run prints out the default config.

type ImportCommand Uses

type ImportCommand struct {
    // Destination host and port.
    Host string `json:"host"`

    // Name of the index & field to import into.
    Index string `json:"index"`
    Field string `json:"field"`

    // Options for the index to be created if it doesn't exist
    IndexOptions pilosa.IndexOptions

    // Options for the field to be created if it doesn't exist
    FieldOptions pilosa.FieldOptions

    // CreateSchema ensures the schema exists before import
    CreateSchema bool

    // Clear clears the import data as opposed to setting it.
    Clear bool

    // Filenames to import from.
    Paths []string `json:"paths"`

    // Size of buffer used to chunk import.
    BufferSize int `json:"bufferSize"`

    // Enables sorting of data file before import.
    Sort bool `json:"sort"`

    // Standard input/output
    *pilosa.CmdIO

    TLS server.TLSConfig
    // contains filtered or unexported fields
}

ImportCommand represents a command for bulk importing data.

func NewImportCommand Uses

func NewImportCommand(stdin io.Reader, stdout, stderr io.Writer) *ImportCommand

NewImportCommand returns a new instance of ImportCommand.

func (*ImportCommand) Run Uses

func (cmd *ImportCommand) Run(ctx context.Context) error

Run executes the main program execution.

func (*ImportCommand) TLSConfiguration Uses

func (cmd *ImportCommand) TLSConfiguration() server.TLSConfig

func (*ImportCommand) TLSHost Uses

func (cmd *ImportCommand) TLSHost() string

type InspectCommand Uses

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 Uses

func NewInspectCommand(stdin io.Reader, stdout, stderr io.Writer) *InspectCommand

NewInspectCommand returns a new instance of InspectCommand.

func (*InspectCommand) Run Uses

func (cmd *InspectCommand) Run(_ context.Context) error

Run executes the inspect command.

Package ctl imports 21 packages (graph) and is imported by 4 packages. Updated 2019-10-10. Refresh now. Tools for package owners.