metadata

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2016 License: Apache-2.0 Imports: 6 Imported by: 0

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
}

func NewClient

func NewClient(url string) *Client

func NewClientAndWait

func NewClientAndWait(url string) (*Client, error)

func (*Client) GetContainers

func (m *Client) GetContainers() ([]Container, error)

func (*Client) GetHost

func (m *Client) GetHost(UUID string) (Host, error)

func (*Client) GetHosts

func (m *Client) GetHosts() ([]Host, error)

func (*Client) GetSelfContainer

func (m *Client) GetSelfContainer() (Container, error)

func (*Client) GetSelfService

func (m *Client) GetSelfService() (Service, error)

func (*Client) GetSelfServiceByName

func (m *Client) GetSelfServiceByName(name string) (Service, error)

func (*Client) GetSelfStack

func (m *Client) GetSelfStack() (Stack, error)

func (*Client) GetServiceContainers

func (m *Client) GetServiceContainers(serviceName string, stackName string) ([]Container, error)

func (*Client) GetServices

func (m *Client) GetServices() ([]Service, error)

func (*Client) GetVersion

func (m *Client) GetVersion() (string, error)

func (*Client) OnChange

func (m *Client) OnChange(intervalSeconds int, do func(string))

func (*Client) SendRequest

func (m *Client) SendRequest(path string) ([]byte, error)

type Container

type Container struct {
	Name        string            `json:"name"`
	PrimaryIp   string            `json:"primary_ip"`
	Ips         []string          `json:"ips"`
	Ports       []string          `json:"ports"`
	ServiceName string            `json:"service_name"`
	StackName   string            `json:"stack_name"`
	Labels      map[string]string `json:"labels"`
	CreateIndex int               `json:"create_index"`
	HostUUID    string            `json:"host_uuid"`
	UUID        string            `json:"uuid"`
}

type Host

type Host struct {
	Name    string            `json:"name"`
	AgentIP string            `json:"agent_ip"`
	HostId  int               `json:"host_id"`
	Labels  map[string]string `json:"labels"`
	UUID    string            `json:"uuid"`
}

type Service

type Service struct {
	Scale       int                    `json:"scale"`
	Name        string                 `json:"name"`
	StackName   string                 `json:"stack_name"`
	Kind        string                 `json:"kind"`
	Hostname    string                 `json:"hostname"`
	Vip         string                 `json:"vip"`
	CreateIndex int                    `json:"create_index"`
	UUID        string                 `json:"uuid"`
	ExternalIps []string               `json:"external_ips"`
	Sidekicks   []string               `json:"sidekicks"`
	Containers  []Container            `json:"containers"`
	Ports       []string               `json:"ports"`
	Labels      map[string]string      `json:"labels"`
	Links       map[string]string      `json:"links"`
	Metadata    map[string]interface{} `json:"metadata"`
}

type Stack

type Stack struct {
	EnvironmentName string    `json:"environment_name"`
	Name            string    `json:"name"`
	Services        []Service `json:"services"`
}

Jump to

Keyboard shortcuts

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