corosync

package module
v0.0.0-...-f881232 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2019 License: Apache-2.0 Imports: 8 Imported by: 1

README

gocorosync

GoDoc

A Go package to interact with a local corosync installation.

Installation

gocorosync requires a Go version with module support (>1.11). You can go get the source as usual:

export GO111MODULE=on
go get github.com/LINBIT/gocorosync

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidOutput = errors.New("invalid corosync-quorumtool output")

Functions

func GenerateAuthkey

func GenerateAuthkey(path string) error

GenerateAuthkey calls corosync-keygen in order to generate an authkey and write it to a location specified by `path`. It returns an error, if applicable.

func GenerateConfig

func GenerateConfig(nodeIPs []net.IP, clusterName string) string

Types

type CorosyncNode

type CorosyncNode struct {
	ID int
	IP net.IP
}

type CorosyncQuorumNode

type CorosyncQuorumNode struct {
	CorosyncNode
	Votes int
}

type QuorumStatus

type QuorumStatus struct {
	Nodes         []*CorosyncQuorumNode
	Votes         int
	VotesExpected int
	Quorate       bool
}

func GetQuorumStatus

func GetQuorumStatus() (*QuorumStatus, error)

Jump to

Keyboard shortcuts

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