server

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 8, 2017 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package server contains the `pilosa server` subcommand which runs Pilosa itself. The purpose of this package is to define an easily tested Command object which handles interpreting configuration and setting up all the objects that Pilosa needs.

Index

Constants

View Source
const (
	// DefaultDataDir is the default data directory.
	DefaultDataDir = "~/.pilosa"
)

Variables

This section is empty.

Functions

func NewStatsClient added in v0.4.0

func NewStatsClient(name string, host string) (pilosa.StatsClient, error)

NewStatsClient creates a stats client from the config

Types

type Command

type Command struct {
	Server *pilosa.Server

	// Configuration.
	Config *pilosa.Config

	// Profiling options.
	CPUProfile string
	CPUTime    time.Duration

	// Standard input/output
	*pilosa.CmdIO

	// running will be closed once Command.Run is finished.
	Started chan struct{}
	// Done will be closed when Command.Close() is called
	Done chan struct{}
}

Command represents the state of the pilosa server command.

func NewCommand

func NewCommand(stdin io.Reader, stdout, stderr io.Writer) *Command

NewCommand returns a new instance of Main.

func (*Command) Close

func (m *Command) Close() error

Close shuts down the server.

func (*Command) Run

func (m *Command) Run(args ...string) (err error)

Run executes the pilosa server.

func (*Command) SetupServer

func (m *Command) SetupServer() error

SetupServer use the cluster configuration to setup this server

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL