Documentation
¶
Index ¶
- Constants
- Variables
- type ClaimOwnershipReq
- type ClaimOwnershipResp
- type ComparisonResult
- type DeleteLabelReq
- type DeleteLabelResp
- type GetFromNodePoolReq
- type GetFromNodePoolResp
- type GetFromOrgReq
- type GetFromOrgResp
- type Label
- type LabelMarshaller
- type ListNodePoolReq
- type ListNodePoolResp
- type ListOrgOwnedNodesReq
- type ListOrgOwnedNodesResp
- type Node
- type NodeId
- type NodeMarshaller
- type NodeRepo
- type PutLabelReq
- type PutLabelResp
- type Query
- type QueryNodePoolReq
- type QueryNodePoolResp
- type QueryOrgOwnedNodesReq
- type QueryOrgOwnedNodesResp
- type RegistrationReq
- type RegistrationResp
- type Selector
Constants ¶
View Source
const ( CompResEq = iota CompResNeq CompResGt CompResLt )
Variables ¶
View Source
var ( ErrNodeClaimed = errors.New("node has been already claimed and is not in the node pool anymore") ErrServerSide = errors.New("an unexpected server-side error occurred") ErrForbidden = errors.New("you are not authorized to perform this operation") ErrNotFound = func(entity string) error { return fmt.Errorf("%s not found", entity) } ErrFieldRequired = errors.New("required filed missing") )
Functions ¶
This section is empty.
Types ¶
type ClaimOwnershipReq ¶
type ClaimOwnershipResp ¶
type ClaimOwnershipResp struct {
Nodes []Node
}
type ComparisonResult ¶
type ComparisonResult int8
func NewCompResultFromString ¶
func NewCompResultFromString(value string) (ComparisonResult, error)
func (ComparisonResult) String ¶
func (c ComparisonResult) String() string
type DeleteLabelReq ¶
type DeleteLabelResp ¶
type DeleteLabelResp struct {
Node Node
}
type GetFromNodePoolReq ¶
type GetFromNodePoolReq struct {
Id NodeId
}
type GetFromNodePoolResp ¶
type GetFromNodePoolResp struct {
Node Node
}
type GetFromOrgReq ¶
type GetFromOrgResp ¶
type GetFromOrgResp struct {
Node Node
}
type Label ¶
type Label interface { Key() string Value() interface{} StringValue() string Compare(value string) ([]ComparisonResult, error) }
func NewBoolLabel ¶
func NewFloat64Label ¶
func NewStringLabel ¶
type LabelMarshaller ¶
type ListNodePoolReq ¶
type ListNodePoolReq struct { }
type ListNodePoolResp ¶
type ListNodePoolResp struct {
Nodes []Node
}
type ListOrgOwnedNodesReq ¶
type ListOrgOwnedNodesReq struct {
Org string
}
type ListOrgOwnedNodesResp ¶
type ListOrgOwnedNodesResp struct {
Nodes []Node
}
type Node ¶
type NodeMarshaller ¶
type NodeRepo ¶
type NodeRepo interface { Put(node Node) error Get(nodeId NodeId, org string) (*Node, error) Delete(node Node) error ListNodePool() ([]Node, error) ListOrgOwnedNodes(org string) ([]Node, error) QueryNodePool(query Query) ([]Node, error) QueryOrgOwnedNodes(query Query, org string) ([]Node, error) PutLabel(node Node, label Label) (*Node, error) DeleteLabel(node Node, labelKey string) (*Node, error) ListAllNodes() ([]Node, error) }
type PutLabelReq ¶
type PutLabelResp ¶
type PutLabelResp struct {
Node Node
}
type QueryNodePoolReq ¶
type QueryNodePoolReq struct {
Query Query
}
type QueryNodePoolResp ¶
type QueryNodePoolResp struct {
Nodes []Node
}
type QueryOrgOwnedNodesReq ¶
type QueryOrgOwnedNodesResp ¶
type QueryOrgOwnedNodesResp struct {
Nodes []Node
}
type RegistrationReq ¶
type RegistrationResp ¶
type RegistrationResp struct {
NodeId string
}
type Selector ¶
type Selector struct { LabelKey string ShouldBe ComparisonResult Value string }
Click to show internal directories.
Click to hide internal directories.