api

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2016 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WeaveHTTPHost = "127.0.0.1"
	WeaveHTTPPort = 6784
)

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(addr string, log Logger) *Client

func (*Client) AllocateIP

func (client *Client) AllocateIP(ID string) (*net.IPNet, error)

returns an IP for the ID given, allocating a fresh one if necessary

func (*Client) AllocateIPInSubnet added in v1.5.0

func (client *Client) AllocateIPInSubnet(ID string, subnet *net.IPNet) (*net.IPNet, error)

func (*Client) ClaimIP added in v1.5.0

func (client *Client) ClaimIP(ID string, cidr *net.IPNet) error

Claim a specific IP on behalf of the ID

func (*Client) Connect

func (client *Client) Connect(remote string) error

func (*Client) DNSDomain added in v1.5.0

func (client *Client) DNSDomain() (string, error)

func (*Client) DefaultSubnet

func (client *Client) DefaultSubnet() (*net.IPNet, error)

func (*Client) DeregisterWithDNS

func (client *Client) DeregisterWithDNS(ID string, ip string) error

func (*Client) LookupIP

func (client *Client) LookupIP(ID string) (*net.IPNet, error)

returns an IP for the ID given, or nil if one has not been allocated

func (*Client) RegisterWithDNS

func (client *Client) RegisterWithDNS(ID string, fqdn string, ip string) error

func (*Client) ReleaseIPsFor added in v1.5.0

func (client *Client) ReleaseIPsFor(ID string) error

release all IPs owned by an ID

type Logger added in v1.5.0

type Logger interface {
	Infof(string, ...interface{})
	Debugf(string, ...interface{})
}

Jump to

Keyboard shortcuts

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