otpl

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2017 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package otpl adds some OpenTable-specific interop methods. These will one day be removed.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeploySpecParser

type DeploySpecParser struct {
	WD shell.Shell
	// contains filtered or unexported fields
}

DeploySpecParser parses sous.DeploySpecs from otpl-deploy config files. NOTE: otpl-deploy config is an internal tool at OpenTable, one day this code will be removed.

func NewDeploySpecParser

func NewDeploySpecParser() *DeploySpecParser

NewDeploySpecParser generates a new DeploySpecParser with default logging.

func (*DeploySpecParser) GetDeploySpecs

func (dsp *DeploySpecParser) GetDeploySpecs(wd shell.Shell) sous.DeploySpecs

GetDeploySpecs searches the working directory of wd to find otpl-deploy config files in their standard locations (config/{cluster-name}), and converts them to sous.DeploySpecs.

func (*DeploySpecParser) GetSingleDeploySpec

func (dsp *DeploySpecParser) GetSingleDeploySpec(wd shell.Shell) *sous.DeploySpec

GetSingleDeploySpec returns a single sous.DeploySpec from the working directory of wd. It assumes that this directory contains at least a file called singularity.json, and optionally an additional file called singularity-requst.json.

type SingularityJSON

type SingularityJSON struct {
	Resources SingularityResources
	Env       sous.Env
}

SingularityJSON represents the JSON in an otpl-deploy singularity.json file.

type SingularityRequestJSON

type SingularityRequestJSON struct {
	// Instances is the number of instances in this deployment.
	Instances int
}

SingularityRequestJSON represents JSON in an otpl-deploy singularity-request.json file.

type SingularityResources

type SingularityResources map[string]float64

SingularityResources represents the resources section in SingularityJSON.

func (SingularityResources) SousResources

func (sr SingularityResources) SousResources() sous.Resources

SousResources returns the equivalent sous.Resources.

Jump to

Keyboard shortcuts

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