Documentation
¶
Index ¶
- Constants
- func DefaultServerURL(host string) (*url.URL, error)
- func IsInstalled(runner kubectl.Runner) bool
- func NewDebugTransport(rt http.RoundTripper) http.RoundTripper
- func Uninstall(runner kubectl.Runner) (string, error)
- type Client
- func (c *Client) Delete(endpoint string, v interface{}) (*Response, error)
- func (c *Client) DeleteDeployment(name string) (*common.Deployment, error)
- func (c *Client) DescribeDeployment(name string) (*common.Manifest, error)
- func (c *Client) Do(req *Request) *Response
- func (c *Client) Exec(req *Request, v interface{}) (*Response, error)
- func (c *Client) Get(endpoint string, v interface{}) (*Response, error)
- func (c *Client) GetDeployment(name string) (*common.Deployment, error)
- func (c *Client) ListDeployments() ([]string, error)
- func (c *Client) NewRequest(method, endpoint string, payload interface{}) *Request
- func (c *Client) Post(endpoint string, payload, v interface{}) (*Response, error)
- func (c *Client) PostChart(filename, deployname string) (string, error)
- func (c *Client) PostDeployment(res *common.Resource) error
- func (c *Client) Result(resp *Response, v interface{}) (*Response, error)
- func (c *Client) SetDebug(enable bool) *Client
- func (c *Client) SetTimeout(seconds int) *Client
- func (c *Client) SetTransport(tr http.RoundTripper) *Client
- type HTTPError
- type Installer
- type Request
- type Response
Constants ¶
const ( // DefaultHTTPTimeout is the default HTTP timeout. DefaultHTTPTimeout = time.Second * 10 // DefaultHTTPProtocol is the default HTTP Protocol (http, https). DefaultHTTPProtocol = "http" )
const InstallYAML = `` /* 3208-byte string literal not displayed */
InstallYAML is the installation YAML for DM.
Variables ¶
This section is empty.
Functions ¶
func DefaultServerURL ¶
DefaultServerURL converts a host, host:port, or URL string to the default base server API path to use with a Client
func IsInstalled ¶
IsInstalled checks whether DM has been installed.
func NewDebugTransport ¶
func NewDebugTransport(rt http.RoundTripper) http.RoundTripper
NewDebugTransport returns a debugging implementation of a RoundTripper.
Types ¶
type Client ¶
type Client struct {
// Timeout on HTTP connections.
HTTPTimeout time.Duration
// Transport
Transport http.RoundTripper
// Debug enables http logging
Debug bool
// contains filtered or unexported fields
}
Client is a DM client.
func (*Client) DeleteDeployment ¶
func (c *Client) DeleteDeployment(name string) (*common.Deployment, error)
DeleteDeployment deletes the supplied deployment
func (*Client) DescribeDeployment ¶
DescribeDeployment describes the kubernetes resources of the supplied deployment by fetching the latest manifest.
func (*Client) GetDeployment ¶
func (c *Client) GetDeployment(name string) (*common.Deployment, error)
GetDeployment retrieves the supplied deployment
func (*Client) ListDeployments ¶
ListDeployments lists the deployments in DM.
func (*Client) NewRequest ¶
NewRequest creates a new client request
func (*Client) PostChart ¶
PostChart sends a chart to DM for deploying.
This returns the location for the new chart, typically of the form `helm:repo/bucket/name-version.tgz`.
func (*Client) PostDeployment ¶
PostDeployment posts a deployment object to the manager service.
func (*Client) SetTimeout ¶
SetTimeout sets a timeout for http connections
func (*Client) SetTransport ¶
func (c *Client) SetTransport(tr http.RoundTripper) *Client
SetTransport sets a custom Transport. Defaults to http.DefaultTransport
type HTTPError ¶
HTTPError is an error caused by an unexpected HTTP status code.
The StatusCode will not necessarily be a 4xx or 5xx. Any unexpected code may be returned.
type Installer ¶
type Installer struct {
// Expandybird params are used to render the expandybird manifest.
Expandybird map[string]interface{}
// Resourcifier params are used to render the resourcifier manifest.
Resourcifier map[string]interface{}
// Manager params are used to render the manager manifest.
Manager map[string]interface{}
}
Installer is capable of installing DM into Kubernetes.
See InstallYAML.