control

package
v0.0.0-...-ff5f600 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2016 License: BSD-3-Clause Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterClient

func RegisterClient(name string, c ClientGenerator) error

RegisterClient registers a ClientGenerator with the given name.

Types

type ClientGenerator

type ClientGenerator func() client.Client

ClientGenerator is a function that generates a particular client implementation.

func LookupClient

func LookupClient(name string) ClientGenerator

LookupClient returns a ClientGenerator from the registry. If no ClientGenerator is registered under the given name, then LookupClient returns nil.

type Controller

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

Controller handles starting and stopping syncbase instances according to model universes.

func NewController

func NewController(ctx *context.T, opts Opts) (*Controller, error)

NewController returns a new Controller configured by opts.

func (*Controller) PauseUniverse

func (c *Controller) PauseUniverse() error

PauseUniverse stops all clients but leaves syncbases running.

func (*Controller) ResumeUniverse

func (c *Controller) ResumeUniverse() error

ResumeUniverse restarts all clients.

func (*Controller) Run

func (c *Controller) Run(u *model.Universe) error

Run runs a mounttable and a number of syncbased instances with connectivity defined by the given model. Run can be called multiple times, and will update the running syncbases to reflect the model. Any running instances not contained in the model will be stopped. Any non-running instances contained in the model will be started.

func (*Controller) RunChecker

func (c *Controller) RunChecker(checker checker.Checker) error

RunChecker runs the given Checker.

func (*Controller) TearDown

func (c *Controller) TearDown() error

TearDown stops all instances and the root mounttable.

type Opts

type Opts struct {
	// Directory that will contain all instance output.
	RootDir string

	// Send all child process output to stdout/stderr.  Usefull for tests.
	DebugOutput bool

	// Tests should pass their testing.TB instance, non-tests should pass nil.
	TB gosh.TB
}

Opts is used to configure the Controller.

Jump to

Keyboard shortcuts

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