cib

package
v0.0.0-...-7f9e59b Latest Latest
Warning

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

Go to latest
Published: May 30, 2022 License: GPL-3.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AsyncCib

type AsyncCib struct {
	// contains filtered or unexported fields
}

AsyncCib wraps the CIB retrieval from go-pacemaker in an asynchronous interface, so that other parts of the server have a single copy of the CIB available at any time.

Also provides a subscription interface for the long polling request end point, via Wait().

func (*AsyncCib) Get

func (acib *AsyncCib) Get() string

Get returns the current CIB XML document (or nil).

func (*AsyncCib) Start

func (acib *AsyncCib) Start()

Start launches two goroutines, one which runs the go-pacemaker mainloop and one which listens for CIB events (the CIB fetcher goroutine).

func (*AsyncCib) Version

func (acib *AsyncCib) Version() *pacemaker.CibVersion

Version returns the current CIB version (or nil).

func (*AsyncCib) Wait

func (acib *AsyncCib) Wait(timeout int, defval string) string

Wait blocks for up to `timeout` seconds for a CIB change event.

type LogRecord

type LogRecord struct {
	// contains filtered or unexported fields
}

LogRecord records the last warning and error messages, to avoid spamming the log with duplicate messages.

Jump to

Keyboard shortcuts

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