driver

package
v0.1.0-alpha Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2016 License: AGPL-3.0 Imports: 15 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Base

type Base struct {
	// Name of the tenet
	Name string

	Driver string

	Registry string

	// TODO(waigani) this is docker specific. Should it be set in
	// ConfigOptions? Or do we have driverOptions?
	Tag string

	// Config options for tenet
	ConfigOptions Options
	// contains filtered or unexported fields
}

func (*Base) EditFilename

func (b *Base) EditFilename(filename string) (editedFilename string)

func (*Base) EditIssue

func (b *Base) EditIssue(issue *api.Issue) (editedIssue *api.Issue)

func (*Base) GetOptions

func (b *Base) GetOptions() Options

func (*Base) Pull

func (b *Base) Pull(bool) error

type Binary

type Binary struct {
	*Base
}

Binary is a tenet driver to execute binary tenets found in ~/.lingo/tenets/<repo>/<tenet>

func (*Binary) EditFilename

func (b *Binary) EditFilename(filename string) (editedFilename string)

func (*Binary) Service

func (b *Binary) Service() (Service, error)

Check that a file exists at the expected location and is executable. Setup the service, but don't start it.

type Docker

type Docker struct {
	*Base
	// contains filtered or unexported fields
}

Docker is a tenet driver which runs tenets inside a docker container.

func (*Docker) EditFilename

func (d *Docker) EditFilename(f string) string

Docker mounts source code under /source/ so we need to prepend this to all file names.

func (*Docker) EditIssue

func (d *Docker) EditIssue(issue *api.Issue) (editedIssue *api.Issue)

func (*Docker) Pull

func (d *Docker) Pull(update bool) error

Pull the image for this tenet from the given registry.

func (*Docker) Service

func (d *Docker) Service() (Service, error)

Init the service.

type Driver

type Driver interface {
	Pull(bool) error

	Service() (Service, error)

	EditFilename(filename string) (editedFilename string)

	EditIssue(issue *api.Issue) (editedIssue *api.Issue)
}

type Options

type Options map[string]interface{}

type Service

type Service interface {
	Start() error
	Stop() error
	// IsRunning() bool
	DialGRPC() (*grpc.ClientConn, error)
}

service handles operations with the underlying backing micro-service tenet server.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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