api

package
v0.0.0-...-ccbff5b Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateDeployment

func CreateDeployment(dm agent.Manager, w http.ResponseWriter, r *http.Request)

CreateDeployment receives a JSON DeploymentBlueprint that will be handled by the agent.Manager and responded to with a DeploymentResponseLite, if appropriate.

func DeleteDeployment

func DeleteDeployment(dm agent.Manager, w http.ResponseWriter, r *http.Request)

DeleteDeployment tells the manager to delete a deployment and returns a No Content response code.

func ListDeployments

func ListDeployments(dm agent.Manager, w http.ResponseWriter, r *http.Request)

ListDeployments queries the manager and writes deployment JSON to the http.ResponseWriter.

func Metadata

func Metadata(dm agent.Manager, w http.ResponseWriter, r *http.Request)

Metadata retrieves metadata from the Manager and writes JSON.

func ReDeploy

func ReDeploy(dm agent.Manager, w http.ResponseWriter, r *http.Request)

ReDeploy deletes and re-deploys an existing deployment.

func RedeploymentURLForDeploymentID

func RedeploymentURLForDeploymentID(id string) string

RedeploymentURLForDeploymentID returns the URL to redeploy a specific deployment.

func ShowDeployment

func ShowDeployment(dm agent.Manager, w http.ResponseWriter, r *http.Request)

ShowDeployment gets a deployment from the manager and returns its full JSON.

func URLForDeploymentID

func URLForDeploymentID(id string) string

URLForDeploymentID returns the URL for a specific deployment.

func URLForDeployments

func URLForDeployments() string

URLForDeployments returns the URL for all deployments.

func URLForMetadata

func URLForMetadata() string

URLForMetadata returns the URL for metadata.

Types

type Server

type Server interface {
	Start(string)
	// contains filtered or unexported methods
}

A Server is the HTTP server which responds to API requests.

func MakeInsecureServer

func MakeInsecureServer(dm agent.Manager) Server

MakeInsecureServer returns a new Server instance containting a manager to which it will defer work.

func MakeServer

func MakeServer(dm agent.Manager, un string, pw string, cf string, kf string) Server

MakeServer returns a new Server instance containting a manager to which it will defer work.

Jump to

Keyboard shortcuts

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