test

package
v0.0.0-...-5c345c6 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2016 License: MIT Imports: 10 Imported by: 0

README

test

test

Usage

type Coordinator
type Coordinator struct {
	SocketDir string
	HTTPPort  int
}

Coordinator holds a coordinator server and a provider server with one or more registered mock Providers to be used for testing.

func NewCoordinator
func NewCoordinator(baseDir string) (*Coordinator, error)

NewCoordinator creates a new Coordinator. The coordinator sever will be given a temporary socket directory and external port.

func (*Coordinator) Cleanup
func (c *Coordinator) Cleanup() error

Cleanup removes the temporary socket directory.

func (*Coordinator) NewProviderViper
func (c *Coordinator) NewProviderViper() *viper.Viper

NewProviderViper prepares a basic viper instance for a Provider, setting appropriate values corresponding to the coordinator and provider server.

func (*Coordinator) ProviderTracker
func (c *Coordinator) ProviderTracker() *acomm.Tracker

ProviderTracker returns the tracker of the provider server.

func (*Coordinator) RegisterProvider
func (c *Coordinator) RegisterProvider(p provider.Provider)

RegisterProvider registers a Provider's tasks with the internal Provider server.

func (*Coordinator) Start
func (c *Coordinator) Start() error

Start starts the Coordinator and Provider servers.

func (*Coordinator) Stop
func (c *Coordinator) Stop()

Stop stops the Coordinator and Provider servers.

-- Generated with godocdown

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Coordinator

type Coordinator struct {
	SocketDir string
	HTTPPort  int
	// contains filtered or unexported fields
}

Coordinator holds a coordinator server and a provider server with one or more registered mock Providers to be used for testing.

func NewCoordinator

func NewCoordinator(baseDir string) (*Coordinator, error)

NewCoordinator creates a new Coordinator. The coordinator sever will be given a temporary socket directory and external port.

func (*Coordinator) Cleanup

func (c *Coordinator) Cleanup() error

Cleanup removes the temporary socket directory.

func (*Coordinator) NewProviderViper

func (c *Coordinator) NewProviderViper() *viper.Viper

NewProviderViper prepares a basic viper instance for a Provider, setting appropriate values corresponding to the coordinator and provider server.

func (*Coordinator) ProviderTracker

func (c *Coordinator) ProviderTracker() *acomm.Tracker

ProviderTracker returns the tracker of the provider server.

func (*Coordinator) RegisterProvider

func (c *Coordinator) RegisterProvider(p provider.Provider)

RegisterProvider registers a Provider's tasks with the internal Provider server.

func (*Coordinator) Start

func (c *Coordinator) Start() error

Start starts the Coordinator and Provider servers.

func (*Coordinator) Stop

func (c *Coordinator) Stop()

Stop stops the Coordinator and Provider servers.

Jump to

Keyboard shortcuts

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