master

package
v0.0.0-...-88aa921 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2015 License: Apache-2.0 Imports: 7 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
}

Client a client for interacting with the serviced master

func NewClient

func NewClient(addr string) (*Client, error)

NewClient Create a new rpc client.

func (*Client) AddHost

func (c *Client) AddHost(host host.Host) error

AddHost adds a Host

func (*Client) AddResourcePool

func (c *Client) AddResourcePool(pool pool.ResourcePool) error

AddResourcePool adds the ResourcePool

func (*Client) AddVirtualIP

func (c *Client) AddVirtualIP(requestVirtualIP pool.VirtualIP) error

AddVirtualIP adds a VirtualIP to a specificpool

func (*Client) Close

func (c *Client) Close() (err error)

Close closes rpc client

func (*Client) FindHostsInPool

func (c *Client) FindHostsInPool(poolID string) ([]host.Host, error)

FindHostsInPool returns all hosts in a pool

func (*Client) GetActiveHostIDs

func (c *Client) GetActiveHostIDs() ([]string, error)

GetActiveHosts returns all active host ids or empty array

func (*Client) GetHost

func (c *Client) GetHost(hostID string) (*host.Host, error)

GetHost gets the host for the given hostID or nil

func (*Client) GetHosts

func (c *Client) GetHosts() ([]host.Host, error)

GetHosts returns all hosts or empty array

func (*Client) GetPoolIPs

func (c *Client) GetPoolIPs(poolID string) (*facade.PoolIPs, error)

GetPoolIPs returns a all IPs in a ResourcePool.

func (*Client) GetResourcePool

func (c *Client) GetResourcePool(poolID string) (*pool.ResourcePool, error)

GetResourcePool gets the pool for the given poolID or nil

func (*Client) GetResourcePools

func (c *Client) GetResourcePools() ([]pool.ResourcePool, error)

GetResourcePools returns all pools or empty array

func (*Client) RemoveHost

func (c *Client) RemoveHost(hostID string) error

RemoveHost removes a host

func (*Client) RemoveResourcePool

func (c *Client) RemoveResourcePool(poolID string) error

RemoveResourcePool removes a ResourcePool

func (*Client) RemoveVirtualIP

func (c *Client) RemoveVirtualIP(requestVirtualIP pool.VirtualIP) error

RemoveVirtualIP removes a VirtualIP from a specific pool

func (*Client) ServiceUse

func (c *Client) ServiceUse(serviceID string, imageID string, registry string, noOp bool) (string, error)

GetHost gets the host for the given hostID or nil

func (*Client) UpdateHost

func (c *Client) UpdateHost(host host.Host) error

UpdateHost updates a host

func (*Client) UpdateResourcePool

func (c *Client) UpdateResourcePool(pool pool.ResourcePool) error

UpdateResourcePool adds the ResourcePool

type Server

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

Server is the RPC type for the master(s)

func NewServer

func NewServer(f *facade.Facade) *Server

NewServer creates a new serviced master rpc server

func (*Server) AddHost

func (s *Server) AddHost(host host.Host, _ *struct{}) error

AddHost adds the host

func (*Server) AddResourcePool

func (s *Server) AddResourcePool(pool pool.ResourcePool, _ *struct{}) error

AddResourcePool adds the pool

func (*Server) AddVirtualIP

func (s *Server) AddVirtualIP(requestVirtualIP pool.VirtualIP, _ *struct{}) error

AddVirtualIP adds a specific virtual IP to a pool

func (*Server) FindHostsInPool

func (s *Server) FindHostsInPool(poolID string, hostReply *[]host.Host) error

FindHostsInPool Returns all Hosts in a pool

func (*Server) GetActiveHostIDs

func (s *Server) GetActiveHostIDs(empty struct{}, hostReply *[]string) error

GetActiveHosts returns all active host ids

func (*Server) GetHost

func (s *Server) GetHost(hostID string, reply *host.Host) error

GetHost gets the host

func (*Server) GetHosts

func (s *Server) GetHosts(empty struct{}, hostReply *[]host.Host) error

GetHosts returns all Hosts

func (*Server) GetPoolIPs

func (s *Server) GetPoolIPs(poolID string, reply *facade.PoolIPs) error

GetPoolIPs gets all ips available to a pool

func (*Server) GetResourcePool

func (s *Server) GetResourcePool(poolID string, reply *pool.ResourcePool) error

GetResourcePool gets the pool

func (*Server) GetResourcePools

func (s *Server) GetResourcePools(empty struct{}, poolsReply *[]pool.ResourcePool) error

GetResourcePools returns all ResourcePools

func (*Server) RemoveHost

func (s *Server) RemoveHost(hostID string, _ *struct{}) error

RemoveHost removes the host

func (*Server) RemoveResourcePool

func (s *Server) RemoveResourcePool(poolID string, _ *struct{}) error

RemoveResourcePool removes the pool

func (*Server) RemoveVirtualIP

func (s *Server) RemoveVirtualIP(requestVirtualIP pool.VirtualIP, _ *struct{}) error

RemoveVirtualIP removes a specific virtual IP from a pool

func (*Server) ServiceUse

func (s *Server) ServiceUse(request *ServiceUseRequest, returnImage *string) error

Use a new image for a given service - this will pull the image and tag it

func (*Server) UpdateHost

func (s *Server) UpdateHost(host host.Host, _ *struct{}) error

UpdateHost updates the host

func (*Server) UpdateResourcePool

func (s *Server) UpdateResourcePool(pool pool.ResourcePool, _ *struct{}) error

UpdateResourcePool updates the pool

type ServiceUseRequest

type ServiceUseRequest struct {
	ServiceID string
	ImageID   string
	Registry  string
	NoOp      bool
}

Jump to

Keyboard shortcuts

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