cluster

package
v0.0.0-...-58fd08c Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SBDPath            = "/usr/sbin/sbd"
	SBDConfigPath      = "/etc/sysconfig/sbd"
	SBDStatusUnknown   = "unknown"
	SBDStatusUnhealthy = "unhealthy"
	SBDStatusHealthy   = "healthy"
)

Variables

This section is empty.

Functions

func LoadSbdConfig

func LoadSbdConfig(sbdConfigPath string) (map[string]string, error)

func Md5sumFile

func Md5sumFile(filePath string) (string, error)

Types

type Cluster

type Cluster struct {
	Cib      cib.Root
	Crmmon   crmmon.Root
	SBD      SBD
	ID       string `json:"Id"`
	Name     string
	DC       bool
	Provider string
}

func NewCluster

func NewCluster() (*Cluster, error)

func NewClusterWithDiscoveryTools

func NewClusterWithDiscoveryTools(discoveryTools *DiscoveryTools) (*Cluster, error)

func (*Cluster) FencingType

func (c *Cluster) FencingType() string

func (*Cluster) IsDC

func (c *Cluster) IsDC() bool

func (*Cluster) IsFencingSBD

func (c *Cluster) IsFencingSBD() bool

type DiscoveryTools

type DiscoveryTools struct {
	CibAdmPath      string
	CrmmonAdmPath   string
	CorosyncKeyPath string
	SBDPath         string
	SBDConfigPath   string
	CommandExecutor utils.CommandExecutor
}

type SBD

type SBD struct {
	Devices []*SBDDevice
	Config  map[string]string
}

func NewSBD

func NewSBD(executor utils.CommandExecutor, sbdPath, sbdConfigPath string) (SBD, error)

type SBDDevice

type SBDDevice struct {
	Device string
	Status string
	Dump   SBDDump
	List   []*SBDNode
	// contains filtered or unexported fields
}

func NewSBDDevice

func NewSBDDevice(executor utils.CommandExecutor, sbdPath, device string) SBDDevice

func (*SBDDevice) LoadDeviceData

func (s *SBDDevice) LoadDeviceData() error

type SBDDump

type SBDDump struct {
	Header          string
	UUID            string `json:"Uuid"`
	Slots           int
	SectorSize      int
	TimeoutWatchdog int
	TimeoutAllocate int
	TimeoutLoop     int
	TimeoutMsgwait  int
}

type SBDNode

type SBDNode struct {
	ID     int `json:"Id"`
	Name   string
	Status string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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