Documentation ¶
Index ¶
- type Client
- type Directory
- type NodeFilter
- func (n NodeFilter) Apply(query url.Values)
- func (n NodeFilter) WithCRU(cru int64) NodeFilter
- func (n NodeFilter) WithCity(city string) NodeFilter
- func (n NodeFilter) WithCountry(country string) NodeFilter
- func (n NodeFilter) WithFarm(id int64) NodeFilter
- func (n NodeFilter) WithHRU(hru int64) NodeFilter
- func (n NodeFilter) WithMRU(sru int64) NodeFilter
- func (n NodeFilter) WithProofs(proofs bool) NodeFilter
- type Pager
- type Phonebook
- type Signer
- type Workloads
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Directory ¶
type Directory interface { FarmRegister(farm directory.Farm) (schema.ID, error) FarmList(tid schema.ID, name string, page *Pager) (farms []directory.Farm, err error) FarmGet(id schema.ID) (farm directory.Farm, err error) NodeRegister(node directory.Node) error NodeList(filter NodeFilter) (nodes []directory.Node, err error) NodeGet(id string, proofs bool) (node directory.Node, err error) NodeSetInterfaces(id string, ifaces []directory.Iface) error NodeSetPorts(id string, ports []uint) error NodeSetPublic(id string, pub directory.PublicIface) error //TODO: this method call uses types from zos that is not generated //from the schema. Which is wrong imho. NodeSetCapacity( id string, resources directory.ResourceAmount, dmiInfo dmi.DMI, disksInfo capacity.Disks, hypervisor []string, ) error NodeUpdateUptime(id string, uptime uint64) error NodeUpdateUsedResources(id string, amount directory.ResourceAmount) error }
Directory API interface
type NodeFilter ¶
type NodeFilter struct {
// contains filtered or unexported fields
}
NodeFilter used to build a query for node list
func (NodeFilter) WithCRU ¶
func (n NodeFilter) WithCRU(cru int64) NodeFilter
WithCRU filter with CRU
func (NodeFilter) WithCity ¶
func (n NodeFilter) WithCity(city string) NodeFilter
WithCity filter with city
func (NodeFilter) WithCountry ¶
func (n NodeFilter) WithCountry(country string) NodeFilter
WithCountry filter with country
func (NodeFilter) WithFarm ¶
func (n NodeFilter) WithFarm(id int64) NodeFilter
WithFarm filter with farm
func (NodeFilter) WithHRU ¶
func (n NodeFilter) WithHRU(hru int64) NodeFilter
WithHRU filter with HRU
func (NodeFilter) WithMRU ¶
func (n NodeFilter) WithMRU(sru int64) NodeFilter
WithMRU filter with mru
func (NodeFilter) WithProofs ¶
func (n NodeFilter) WithProofs(proofs bool) NodeFilter
WithProofs filter with proofs
type Phonebook ¶
type Phonebook interface { Create(user phonebook.User) (schema.ID, error) List(name, email string, page *Pager) (output []phonebook.User, err error) Get(id schema.ID) (phonebook.User, error) // Update() #TODO Validate(id schema.ID, message, signature string) (bool, error) }
Phonebook interface
type Signer ¶
type Signer struct {
// contains filtered or unexported fields
}
Signer is a utility to easily sign payloads
func NewSignerFromFile ¶
NewSignerFromFile loads signer from a seed file
type Workloads ¶
type Workloads interface { Create(reservation workloads.Reservation) (id schema.ID, err error) List(nextAction *workloads.NextActionEnum, customerTid int64, page *Pager) (reservation []workloads.Reservation, err error) Get(id schema.ID) (reservation workloads.Reservation, err error) SignProvision(id schema.ID, user schema.ID, signature string) error SignDelete(id schema.ID, user schema.ID, signature string) error Workloads(nodeID string, from uint64) ([]workloads.ReservationWorkload, error) WorkloadGet(gwid string) (result workloads.ReservationWorkload, err error) WorkloadPutResult(nodeID, gwid string, result workloads.Result) error WorkloadPutDeleted(nodeID, gwid string) error }
Workloads interface
Click to show internal directories.
Click to hide internal directories.