Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddRouteRequest ¶
Argument to Shoreman.AddRoute()
type GetHostsReply ¶
type Host ¶
type Host struct { Name string Id string Cores int Memory int64 PrivateNetwork Network LastUpdated time.Time // contains filtered or unexported fields }
func CurrentContextAsHost ¶
Create a new Host struct from the running host's values
type Network ¶
func NewNetwork ¶
type PortType ¶
type PortType struct { Port uint16 Transport TransportType Application string // contains filtered or unexported fields }
type ResourcePool ¶
type ResourcePool struct { Name string Id string Cores int Memory int64 HostsRefs []string // contains filtered or unexported fields }
Represents a set of available resources and their contraints.
func (*ResourcePool) GetTotalCores ¶
func (pool *ResourcePool) GetTotalCores() (cores int, err error)
Get the total amount of cores in the resource pool
func (*ResourcePool) GetTotalMemory ¶
func (pool *ResourcePool) GetTotalMemory() (totalMemory int64, err error)
Get the total amount of memory in this resource pool.
type ServiceController ¶
type ServiceController struct { Hosts map[string]*Host ResourcePools map[string]*ResourcePool SystemId string Services map[string]*Service // contains filtered or unexported fields }
func NewServiceController ¶
func NewServiceController(filename string) (c *ServiceController, err error)
Create a new ServiceController.
func (*ServiceController) AddHost ¶
func (c *ServiceController) AddHost(host *Host) error
func (*ServiceController) Save ¶
func (c *ServiceController) Save() error
Save the ServiceController to disk.
type ServicePort ¶
type ShipyardClient ¶
type ShipyardClient struct {
// contains filtered or unexported fields
}
The Shoreman API client
func NewShipyardClient ¶
func NewShipyardClient(connectionString string) (client *ShipyardClient, err error)
Create a ShipyardService client.
type ShipyardError ¶
type ShipyardError struct {
ErrorMessage string
}
func (ShipyardError) Error ¶
func (e ShipyardError) Error() string
type ShipyardService ¶
type ShipyardService struct { Hosts map[string]*Host Services map[string]*Service // contains filtered or unexported fields }
API for Shipyard service
func NewShipyardService ¶
func NewShipyardService(datafile string) (server *ShipyardService, err error)
Create a new Shipyard instance.
func (*ShipyardService) GetHosts ¶
func (s *ShipyardService) GetHosts(unused *interface{}, reply *GetHostsReply) error
Return Host obect to client
type Shoreman ¶
type Shoreman struct{}
API for Shoreman daemon.
func (*Shoreman) AddRoute ¶
func (s *Shoreman) AddRoute(request AddRouteRequest, unused *interface{}) error
Attempt to add a static route to the Shoreman host
func (*Shoreman) DockerNetwork ¶
Return the private network used by docker running on this host.
type ShoremanClient ¶
type ShoremanClient struct {
// contains filtered or unexported fields
}
The Shoreman API client
func NewShoremanClient ¶
func NewShoremanClient(connectionString string) (client *ShoremanClient, err error)
Create a new Shoreman RPC client
func (*ShoremanClient) AddRoute ¶
func (client *ShoremanClient) AddRoute(gateway string, network Network) error
Attempt to add a static route to the Shoreman host
func (*ShoremanClient) Close ¶
func (client *ShoremanClient) Close() error
func (*ShoremanClient) DockerNetwork ¶
func (client *ShoremanClient) DockerNetwork() (network *Network, err error)
call the Shoreman.DockerNetwork() RPC
func (*ShoremanClient) HostInfo ¶
func (client *ShoremanClient) HostInfo() (host *Host, err error)
call Shoreman.HostInfo() RPC method
type ShoremanError ¶
type ShoremanError struct {
ErrorMessage string
}
An error type for Shoreman operations
func (ShoremanError) Error ¶
func (e ShoremanError) Error() string
type TransportType ¶
type TransportType string
const ( TCP TransportType = "tcp" UDP TransportType = "udp" )