replicator

package
v0.0.1-alpha Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2017 License: MIT Imports: 14 Imported by: 2

Documentation

Index

Constants

View Source
const (
	ExitCodeOK int = 0

	ExitCodeError = 10 + iota
	ExitCodeRunnerError
	ExitCodeInterrupt
	ExitCodeParseConfigError
	ExitCodeTelemtryError
)

Setup our exit codes; errors start at 10 for easier debugging.

Variables

This section is empty.

Functions

func RuntimeStats

func RuntimeStats() map[string]string

RuntimeStats is used to return various runtime information.

Types

type CLI

type CLI struct {
}

CLI is the main entry point for Consulate.

func NewCLI

func NewCLI() *CLI

NewCLI returns the CLI struct.

func (*CLI) Run

func (cli *CLI) Run(args []string) int

Run accepts a slice of command line arguments and ultimatly returns an int which represents the exit code of the command. The function sets up the runner and appropriate configuration and attempts to perform the run.

type Runner

type Runner struct {
	// contains filtered or unexported fields
}

Runner is the main runner struct.

func NewRunner

func NewRunner(config *structs.Config) (*Runner, error)

NewRunner sets up the Runner type.

func (*Runner) Start

func (r *Runner) Start()

Start creates a new runner and uses a ticker to block until the doneChan is closed at which point the ticker is stopped.

func (*Runner) Stop

func (r *Runner) Stop()

Stop halts the execution of this runner.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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