models

package
v0.0.0-...-8b2ef79 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2017 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateNode

func CreateNode(node *RhdNode) error

CreateNode allows creating a node on the backend

func CreateNodeCache

func CreateNodeCache(node *RhdNode) error

CreateNodeCache stores the cache layer lookup functionality

func CreateRhd

func CreateRhd(rhd *RackHD) error

CreateRhd stores a RackHD instance on the backend

func DeleteNodeCache

func DeleteNodeCache(id string) error

DeleteNodeCache removes a cache index

func DeleteRhdByID

func DeleteRhdByID(id string) error

DeleteRhdByID removes a RackHD from the backend

func DeleteRhdsByIDs

func DeleteRhdsByIDs(ids []string) error

DeleteRhdsByIDs removes multiple RackHDs from the backend

func GetRhdIDByNodeID

func GetRhdIDByNodeID(id string) (string, error)

GetRhdIDByNodeID returns the RHD ID for a node

func InitBackend

func InitBackend()

InitBackend creates the default backend capability

func UpdateNode

func UpdateNode(node *RhdNode) error

UpdateNode updates a RhdNode on the backend

func UpdateRhd

func UpdateRhd(rhd *RackHD) error

UpdateRhd updates a RackHD instance on the backend

Types

type AmqpConfig

type AmqpConfig struct {
	URI amqp.URI
}

AmqpConfig struct wrapper of amqp URI for future expansion

type HTTPConfig

type HTTPConfig struct {
	URL *url.URL
}

HTTPConfig struct wrapper of URL for future expansion

type RackHD

type RackHD struct {
	ID       string
	HTTPConf HTTPConfig
	AmqpConf AmqpConfig
	Nodes    []*RhdNode // can be found in the nodes.go file
}

RackHD stores the relevant data about RackHD nodes under management

func GetAllRhd

func GetAllRhd() ([]*RackHD, error)

GetAllRhd returns all RackHD object stored in the backend

func GetRhdByID

func GetRhdByID(id string) (*RackHD, error)

GetRhdByID returns a RackHD based on its unique ID

func GetRhdsByIDs

func GetRhdsByIDs(ids []string) ([]*RackHD, error)

GetRhdsByIDs returns a group of RackHD structs based on an array of unique IDs

func NewRhd

func NewRhd(id string, httpURL string, amqpURI string) (*RackHD, error)

NewRhd creates a RackHD struct for storage

type RhdNode

type RhdNode struct {
	ID    string
	RhdID string
}

RhdNode stores relevant cache data about a node

func GetAllNodes

func GetAllNodes() ([]*RhdNode, error)

GetAllNodes is currently stubbed out but unsupported

func GetAllNodesByRhdID

func GetAllNodesByRhdID(id string) ([]*RhdNode, error)

GetAllNodesByRhdID is currently stubbed out but unsupported

func GetNodeByRhdIDByNodeID

func GetNodeByRhdIDByNodeID(rid string, nid string) (*RhdNode, error)

GetNodeByRhdIDByNodeID is currently stubbed out but unsupported

func GetNodesByRhdIDByNodeIDs

func GetNodesByRhdIDByNodeIDs(rid string, ids []string) ([]*RhdNode, error)

GetNodesByRhdIDByNodeIDs is currently stubbed out but unsupported

func NewRhdNode

func NewRhdNode(rhdID string, nodeID string) (*RhdNode, error)

NewRhdNode creates a new RhdNode object for storage

Jump to

Keyboard shortcuts

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