server

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2017 License: Apache-2.0 Imports: 13 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 GetLogWriter added in v0.5.0

func GetLogWriter(path string, defaultWriter io.Writer) (io.Writer, error)

GetLogWriter opens a file for logging, or a default io.Writer (such as stderr) for an empty path.

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 uses the cluster configuration to set up this server.

Jump to

Keyboard shortcuts

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