Documentation ¶
Overview ¶
The pacemaker package provides an API for reading the Pacemaker cluster configuration (CIB). Copyright (C) 2017 Kristoffer Gronlund <kgronlund@suse.com> See LICENSE for license.
The pacemaker package provides an API for reading the Pacemaker cluster configuration (CIB). Copyright (C) 2017 Kristoffer Gronlund <kgronlund@suse.com> See LICENSE for license.
Index ¶
- func ForCommand(config *CibOpenConfig)
- func ForCommandNonBlocking(config *CibOpenConfig)
- func ForNoConnection(config *CibOpenConfig)
- func ForQuery(config *CibOpenConfig)
- func FromFile(file string) func(*CibOpenConfig)
- func FromRemote(server, user, passwd string, port int, encrypted bool) func(*CibOpenConfig)
- func FromShadow(shadow string) func(*CibOpenConfig)
- func GetShadowFile(name string) string
- func IsTrue(bstr string) bool
- func Mainloop()
- type Cib
- func (cib *Cib) Close() error
- func (cib *Cib) Query() (*CibDocument, error)
- func (cib *Cib) QueryNoChildren() (*CibDocument, error)
- func (cib *Cib) QueryXPath(xpath string) (*CibDocument, error)
- func (cib *Cib) QueryXPathNoChildren(xpath string) (*CibDocument, error)
- func (cib *Cib) Subscribe(callback CibEventFunc) (uint, error)
- func (cib *Cib) Subscribers() map[int]CibEventFunc
- func (cib *Cib) Version() (*CibVersion, error)
- type CibConnection
- type CibDocument
- type CibError
- type CibEvent
- type CibEventFunc
- type CibOpenConfig
- type CibVersion
- type Element
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ForCommand ¶
func ForCommand(config *CibOpenConfig)
func ForCommandNonBlocking ¶
func ForCommandNonBlocking(config *CibOpenConfig)
func ForNoConnection ¶
func ForNoConnection(config *CibOpenConfig)
func ForQuery ¶
func ForQuery(config *CibOpenConfig)
func FromFile ¶
func FromFile(file string) func(*CibOpenConfig)
func FromRemote ¶
func FromRemote(server, user, passwd string, port int, encrypted bool) func(*CibOpenConfig)
func FromShadow ¶
func FromShadow(shadow string) func(*CibOpenConfig)
func GetShadowFile ¶
Types ¶
type Cib ¶
type Cib struct {
// contains filtered or unexported fields
}
Root entity representing the CIB. Can be populated with CIB data if the Decode method is used.
func OpenCib ¶
func OpenCib(options ...func(*CibOpenConfig)) (*Cib, error)
func (*Cib) Query ¶
func (cib *Cib) Query() (*CibDocument, error)
func (*Cib) QueryNoChildren ¶
func (cib *Cib) QueryNoChildren() (*CibDocument, error)
func (*Cib) QueryXPath ¶
func (cib *Cib) QueryXPath(xpath string) (*CibDocument, error)
func (*Cib) QueryXPathNoChildren ¶
func (cib *Cib) QueryXPathNoChildren(xpath string) (*CibDocument, error)
func (*Cib) Subscribers ¶
func (cib *Cib) Subscribers() map[int]CibEventFunc
func (*Cib) Version ¶
func (cib *Cib) Version() (*CibVersion, error)
type CibConnection ¶
type CibConnection int
When connecting to Pacemaker, we have to declare which type of connection to use. Since the API is read-only at the moment, it only really makes sense to pass Query to functions that take a CibConnection parameter.
const ( Query CibConnection = C.cib_query Command CibConnection = C.cib_command NoConnection CibConnection = C.cib_no_connection CommandNonBlocking CibConnection = C.cib_command_nonblocking )
type CibDocument ¶
type CibDocument struct {
// contains filtered or unexported fields
}
func (*CibDocument) Close ¶
func (doc *CibDocument) Close()
func (*CibDocument) ToString ¶
func (doc *CibDocument) ToString() string
func (*CibDocument) Version ¶
func (doc *CibDocument) Version() *CibVersion
type CibError ¶
type CibError struct {
// contains filtered or unexported fields
}
Error type returned by the functions in this package.
type CibEventFunc ¶
type CibEventFunc func(event CibEvent, doc *CibDocument)
type CibOpenConfig ¶
type CibOpenConfig struct {
// contains filtered or unexported fields
}
type CibVersion ¶
func (*CibVersion) String ¶
func (ver *CibVersion) String() string