dcos

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2020 License: Apache-2.0 Imports: 2 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is a generic client for DC/OS.

func NewClient

func NewClient(baseClient *httpclient.Client) *Client

NewClient creates a new DC/OS client.

func (*Client) Metadata

func (c *Client) Metadata() (*Metadata, error)

Metadata returns the DC/OS cluster metadata from "/metadata".

func (*Client) Version

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

Version returns the DC/OS version metadata from "/dcos-metadata/dcos-version.json".

type Error

type Error struct {
	Title       string `json:"title"`
	Description string `json:"description"`
	Code        string `json:"code"`
}

Error is a standard error returned by the DC/OS API.

func (*Error) Error

func (err *Error) Error() string

Error converts an API error to a string.

type Metadata

type Metadata struct {
	PublicIPv4 string `json:"PUBLIC_IPV4"`
	ClusterID  string `json:"CLUSTER_ID"`
}

Metadata contains the DC/OS version metadata.

type Version

type Version struct {
	Version         string `json:"version"`
	DCOSVariant     string `json:"dcos-variant"`
	DCOSImageCommit string `json:"dcos-image-commit"`
	BootstrapID     string `json:"bootstrap-id"`
}

Version contains information about the DC/OS version.

Jump to

Keyboard shortcuts

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