client

package
v0.0.0-...-97873b2 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2014 License: MIT Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoHttpAddress   = errors.New("No HTTP address specified")
	ErrNoDnsAddress    = errors.New("No DNS address specified")
	ErrInvalidResponse = errors.New("Invalid HTTP response")
	ErrServiceNotFound = errors.New("Service not found")
	ErrConflictingUUID = errors.New("Conflicting UUID")
)

Functions

This section is empty.

Types

type Client

type Client struct {
	DNS bool // if true use the DNS when listing servies
	// contains filtered or unexported fields
}

func NewClient

func NewClient(base, secret, domain, basedns string) (*Client, error)

NewClient creates a new skydns client with the specificed host address and DNS port.

func (*Client) Add

func (c *Client) Add(uuid string, s *msg.Service) error

func (*Client) AddCallback

func (c *Client) AddCallback(uuid string, cb *msg.Callback) error

func (*Client) Delete

func (c *Client) Delete(uuid string) error

func (*Client) Get

func (c *Client) Get(uuid string) (*msg.Service, error)

func (*Client) GetAllServices

func (c *Client) GetAllServices() ([]*msg.Service, error)

func (*Client) GetAllServicesDNS

func (c *Client) GetAllServicesDNS() ([]*msg.Service, error)

func (*Client) GetEnvironments

func (c *Client) GetEnvironments() (NameCount, error)

func (*Client) GetRegions

func (c *Client) GetRegions() (NameCount, error)

func (*Client) Update

func (c *Client) Update(uuid string, ttl uint32) error

type NameCount

type NameCount map[string]int

Jump to

Keyboard shortcuts

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