pacemaker

package
v0.0.1-dev-893fa2f Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetVirtualIpHost

func GetVirtualIpHost() (string, error)

func IsVirtualIpOwner

func IsVirtualIpOwner(hostname string) bool

Types

type AttrPair

type AttrPair struct {
	Name  string `xml:"name,attr"`
	Value string `xml:"value,attr"`
}

type Clone

type Clone struct {
	ID        string     `xml:"id,attr"`
	Resources []Resource `xml:"resource"`
}

type ClusterOptions

type ClusterOptions struct {
	StonithEnabled         string `xml:"stonith-enabled,attr"`
	SymmetricCluster       string `xml:"symmetric-cluster,attr"`
	NoQuorumPolicy         string `xml:"no-quorum-policy,attr"`
	MaintenanceMode        string `xml:"maintenance-mode,attr"`
	StopAllResources       string `xml:"stop-all-resources,attr"`
	StonithTimeoutMs       string `xml:"stonith-timeout-ms,attr"`
	PriorityFencingDelayMs string `xml:"priority-fencing-delay-ms,attr"`
}

type CountField

type CountField struct {
	Number string `xml:"number,attr"`
}

type CurrentDC

type CurrentDC struct {
	Name         string `xml:"name,attr"`
	ID           string `xml:"id,attr"`
	Version      string `xml:"version,attr"`
	Present      string `xml:"present,attr"`
	WithQuorum   string `xml:"with_quorum,attr"`
	MixedVersion string `xml:"mixed_version,attr"`
}

type Node

type Node struct {
	Name             string `xml:"name,attr"`
	ID               string `xml:"id,attr"`
	Online           string `xml:"online,attr"`
	Standby          string `xml:"standby,attr"`
	Health           string `xml:"health,attr"`
	ResourcesRunning string `xml:"resources_running,attr"`
}

type NodeAttribute

type NodeAttribute struct {
	Name      string     `xml:"name,attr"`
	Attribute []AttrPair `xml:"attribute"`
}

type NodeHistory

type NodeHistory struct {
	Name            string            `xml:"name,attr"`
	ResourceHistory []ResourceHistory `xml:"resource_history"`
}

type NodeOnHost

type NodeOnHost struct {
	Name   string `xml:"name,attr"`
	ID     string `xml:"id,attr"`
	Cached string `xml:"cached,attr"`
}

type OperationHistory

type OperationHistory struct {
	Call         string `xml:"call,attr"`
	Task         string `xml:"task,attr"`
	RC           string `xml:"rc,attr"`
	RCText       string `xml:"rc_text,attr"`
	Interval     string `xml:"interval,attr,omitempty"`
	LastRCChange string `xml:"last-rc-change,attr"`
	ExecTime     string `xml:"exec-time,attr"`
	QueueTime    string `xml:"queue-time,attr"`
}

type Resource

type Resource struct {
	ID             string       `xml:"id,attr"`
	ResourceAgent  string       `xml:"resource_agent,attr"`
	Role           string       `xml:"role,attr"`
	NodesRunningOn string       `xml:"nodes_running_on,attr"`
	NodeList       []NodeOnHost `xml:"node"`
}

type ResourceHistory

type ResourceHistory struct {
	ID                 string             `xml:"id,attr"`
	OperationHistories []OperationHistory `xml:"operation_history"`
}

type ResourcesConfig

type ResourcesConfig struct {
	Number   string `xml:"number,attr"`
	Disabled string `xml:"disabled,attr"`
	Blocked  string `xml:"blocked,attr"`
}

type Stack

type Stack struct {
	Type            string `xml:"type,attr"`
	PacemakerdState string `xml:"pacemakerd-state,attr"`
}

type Status

type Status struct {
	XMLName          xml.Name `xml:"pacemaker-result"`
	Summary          Summary  `xml:"summary"`
	Nodes            []Node   `xml:"nodes>node"`
	ResourceAndClone struct {
		Resources []Resource `xml:"resource"`
		Clones    []Clone    `xml:"clone"`
	} `xml:"resources"`
	NodeAttributes []NodeAttribute `xml:"node_attributes>node"`
	NodeHistory    []NodeHistory   `xml:"node_history>node"`
}

func GetStatus

func GetStatus() (*Status, error)

func (*Status) GetVipHost

func (s *Status) GetVipHost() (string, error)

type Summary

type Summary struct {
	Stack           Stack           `xml:"stack"`
	CurrentDC       CurrentDC       `xml:"current_dc"`
	LastUpdate      TimestampOrigin `xml:"last_update"`
	LastChange      TimestampOrigin `xml:"last_change"`
	NodesConfigured CountField      `xml:"nodes_configured"`
	ResourcesConfig ResourcesConfig `xml:"resources_configured"`
	ClusterOptions  ClusterOptions  `xml:"cluster_options"`
}

type TimestampOrigin

type TimestampOrigin struct {
	Time   string `xml:"time,attr"`
	Origin string `xml:"origin,attr"`
	User   string `xml:"user,attr,omitempty"`
	Client string `xml:"client,attr,omitempty"`
}

Jump to

Keyboard shortcuts

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