galera

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2023 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

View Source
const (
	GaleraStateFileName = "grastate.dat"
	BootstrapFileName   = "1-bootstrap.cnf"
	BootstrapFile       = `[galera]
wsrep_new_cluster="ON"`
	RecoveryFileName    = "2-recovery.cnf"
	RecoveryLogFileName = "mariadb.err"
)

Variables

View Source
var (
	RecoveryFile = fmt.Sprintf(`[galera]
log_error=%s
wsrep_recover="ON"`, RecoveryLogFileName)
)

Functions

This section is empty.

Types

type Bootstrap

type Bootstrap struct {
	UUID  string `json:"uuid"`
	Seqno int    `json:"seqno"`
}

func (*Bootstrap) Compare

func (g *Bootstrap) Compare(other GaleraRecoverer) int

func (*Bootstrap) GetSeqno

func (b *Bootstrap) GetSeqno() int

func (*Bootstrap) GetUUID

func (b *Bootstrap) GetUUID() string

func (*Bootstrap) Unmarshal

func (r *Bootstrap) Unmarshal(text []byte) error

func (*Bootstrap) Validate

func (b *Bootstrap) Validate() error

type GaleraRecoverer

type GaleraRecoverer interface {
	GetUUID() string
	GetSeqno() int
	Compare(other GaleraRecoverer) int
}

type GaleraState

type GaleraState struct {
	Version         string `json:"version"`
	UUID            string `json:"uuid"`
	Seqno           int    `json:"seqno"`
	SafeToBootstrap bool   `json:"safeToBootstrap"`
}

func (*GaleraState) Compare

func (g *GaleraState) Compare(other GaleraRecoverer) int

func (*GaleraState) GetSeqno

func (g *GaleraState) GetSeqno() int

func (*GaleraState) GetUUID

func (g *GaleraState) GetUUID() string

func (*GaleraState) Marshal

func (g *GaleraState) Marshal() ([]byte, error)

func (*GaleraState) Unmarshal

func (g *GaleraState) Unmarshal(text []byte) error

Jump to

Keyboard shortcuts

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