Documentation
¶
Index ¶
- Constants
- Variables
- func GetNvPairValue(elem *xmltree.Element, name string) (*xmltree.Attr, error)
- type CIB
- func (c *CIB) CreateResource(xml string) error
- func (c *CIB) DissolveConstraints(delItems []string)
- func (c *CIB) FindLrmState(id string) LrmRunState
- func (c *CIB) FindNodeState(uname string) (NodeState, error)
- func (c *CIB) FindResource(id string) *xmltree.Element
- func (c *CIB) ListNodes() ([]Node, error)
- func (c *CIB) ReadConfiguration() error
- func (c *CIB) SetStonithEnabled(value bool) error
- func (c *CIB) StandbyNode(nodeUname string) error
- func (c *CIB) StartResource(id string) error
- func (c *CIB) StopResource(id string) error
- func (c *CIB) UnStandbyNode(nodeUname string) error
- func (c *CIB) Update() error
- func (c *CIB) WaitForResourcesStop(idsToStop []string) (bool, error)
- type ClusterProperty
- type LrmRunState
- type Node
- type NodeState
Constants ¶
View Source
const ( JoinDown joinState = "down" JoinPending joinState = "pending" JoinMember joinState = "member" JoinBanned joinState = "banned" )
Variables ¶
View Source
var (
ErrCibFailed = errors.New("Failed to read the CRM configuration. Maybe the cluster is not started on this node?")
)
Functions ¶
Types ¶
type CIB ¶
func (*CIB) CreateResource ¶
func (*CIB) DissolveConstraints ¶
Removes CRM constraints that refer to the specified delItems names from the CIB XML document tree
func (*CIB) FindLrmState ¶
func (c *CIB) FindLrmState(id string) LrmRunState
func (*CIB) FindNodeState ¶ added in v0.1.1
func (*CIB) ReadConfiguration ¶
ReadConfiguration calls the crm list command and parses the XML data it returns.
func (*CIB) SetStonithEnabled ¶
func (*CIB) StandbyNode ¶ added in v0.1.3
StandbyNode sets a pacemaker node into standby
func (*CIB) StartResource ¶
func (*CIB) StopResource ¶
func (*CIB) UnStandbyNode ¶ added in v0.1.3
UnStandbyNode sets a pacemaker node out of standby
type ClusterProperty ¶
type ClusterProperty string
const (
StonithEnabled ClusterProperty = "cib-bootstrap-options-stonith-enabled"
)
type LrmRunState ¶
type LrmRunState int
LrmRunState represents the state of a CRM resource.
const ( // Unknown means that the resource's state could not be retrieved Unknown LrmRunState = iota // Running means that the resource is verified as running Running // Stopped means that the resource is verfied as stopped Stopped )
func (LrmRunState) MarshalJSON ¶
func (l LrmRunState) MarshalJSON() ([]byte, error)
func (LrmRunState) String ¶
func (l LrmRunState) String() string
Click to show internal directories.
Click to hide internal directories.