draft

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: May 10, 2017 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrChartNotExist is returned when no chart/ directory exists during "draft up."
	ErrChartNotExist = errors.New("chart/ does not exist. Please create it using 'draft create' before calling 'draft up'")
	// ErrDockerfileNotExist is returned when no Dockerfile exists during "draft up."
	ErrDockerfileNotExist = errors.New("Dockerfile does not exist. Please create it using 'draft create' before calling 'draft up'")
)

Functions

This section is empty.

Types

type Client

type Client struct {
	HTTPClient *http.Client
	Endpoint   *url.URL
	// OptionWait specifies whether or not to wait for all resources to be ready on `draft up`
	OptionWait bool
}

Client manages client side of the draft-draftd protocol. It wraps an *http.Client with a url Endpoint and common headers to send on every request.

func New

func New(endpoint *url.URL, client *http.Client) *Client

New returns a new Client with a given a URL and an optional client.

func NewFromString

func NewFromString(endpoint string, client *http.Client) (*Client, error)

NewFromString returns a new Client given a string URL and an optional client.

func (Client) Up

func (c Client) Up(appName, namespace string, out io.Writer, buildContext, chartReader io.ReadCloser, rawVals []byte) error

Up uploads the build context and chart to draftd, then writes messages from draftd to out. appName specifies the Helm release to create/update, and namespace specifies which namespace to deploy the application into.

func (Client) UpFromDir

func (c Client) UpFromDir(appName, namespace string, out io.Writer, appDir string, rawVals []byte) error

UpFromDir prepares the contents of appDir to create a build context and chart archive, then calls Up().

func (*Client) Version

func (c *Client) Version() (*version.Version, error)

Version returns the server version.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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