otpl

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2019 License: MIT Imports: 11 Imported by: 1

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 ManifestParser added in v1.0.1

type ManifestParser struct {
	Log logging.LogSink
	WD  shell.Shell
}

ManifestParser 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 NewManifestParser added in v1.0.1

func NewManifestParser(ls logging.LogSink) *ManifestParser

NewManifestParser generates a new ManifestParser with default logging.

func (*ManifestParser) ParseManifests added in v1.0.1

func (mp *ManifestParser) ParseManifests(wd shell.Shell) (sous.Manifests, error)

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

type SingularityJSON

type SingularityJSON struct {
	RequestID string               `json:"requestId"`
	Resources SingularityResources `json:"resources"`
	Env       sous.Env             `json:"env,omitempty"`
}

SingularityJSON represents the JSON in an otpl-deploy singularity.json file. Note that the json tags are essential to validating parsed JSON contains only recognised fields.

type SingularityRequestJSON

type SingularityRequestJSON struct {
	ID          string `json:"id"`
	RequestType string `json:"requestType"`
	// Instances is the number of instances in this deployment.
	Instances int `json:"instances"`
	// Owners is a comma-separated list of email addresses.
	Owners []string `json:"owners"`
}

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