cmd

package
v0.0.0-...-5168a6d Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2018 License: Apache-2.0 Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RootCmd = &cobra.Command{
	Use:   "Dispatch",
	Short: "Low level distributed init system",
	Long:  `Dispatch is a distributed server system on top of systemd and etcd`,
}

RootCmd represents the base command when called without any subcommands

Functions

func Execute

func Execute()

Execute adds all child commands to the root command sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

Types

type StandardResponse

type StandardResponse struct {
	Status string `json:"status"`
	Error  string `json:"error"`
}

StandardResponse is the server's response for most of the non get requests

type TemplateContent

type TemplateContent struct {
	Name          string            `json:"name"`
	Ports         []int64           `json:"ports"`
	Constraints   map[string]string `json:"constraints"`
	UnitContent   string            `json:"unitContent"`
	MaxPerMachine int64             `json:"maxPerMachine"`
}

TemplateContent are all the properties for a unit

type TemplateParams

type TemplateParams struct {
	Name          string            `json:"name"`
	Ports         []int64           `json:"ports"`
	Constraints   map[string]string `json:"constraints"`
	UnitContent   string            `json:"unitContent"`
	MaxPerMachine int64             `json:"maxPerMachine"`
}

TemplateParams contains all the parameters needed to create a template

type UnitContent

type UnitContent struct {
	Name         string  `json:"name"`
	DesiredState int     `json:"desiredState"`
	Ports        []int64 `json:"ports"`
	Constraints  map[string]string
	UnitContent  string `json:"unitContent"`
	State        int    `json:"state"`
	Machine      string `json:"machine"`
}

UnitContent are all the properties for a unit

type UnitParams

type UnitParams struct {
	Name         string  `json:"name"`
	DesiredState string  `json:"desiredState"`
	Ports        []int64 `json:"ports"`
	Constraints  map[string]string
	UnitContent  string `json:"unitContent"`
	Global       string `json:"global"`
}

UnitParams are all the parameters for a unit

Jump to

Keyboard shortcuts

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