ncd

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

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

Go to latest
Published: Feb 27, 2020 License: MIT Imports: 6 Imported by: 0

README

uyuni-ncd

Uyuni Cluster: Node Controller Daemon. It runs on each Node and ensures the communication between Cluster Director and Uyuni Server.

Documentation

Index

Constants

View Source
const (
	CHANNEL_NODES    = "nodes"
	CHANNEL_DIRECTOR = "director"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Ncd

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

func NewNcd

func NewNcd() *Ncd

func (*Ncd) AddMapper

func (n *Ncd) AddMapper(mapper eventmappers.Mapper) *Ncd

AddMapper adds a mapper to the ncd

func (*Ncd) GetDBListener

func (n *Ncd) GetDBListener() *ncdtransport.PgEventListener

GetDBListener return PgEventListener instance

func (*Ncd) GetMapper

func (n *Ncd) GetMapper(topic string) (*eventmappers.Mapper, error)

GetMapper by a topic

func (*Ncd) GetTransport

func (n *Ncd) GetTransport() *ncdtransport.NcdPubSub

GetTransport returns NcdPubSub instance

func (*Ncd) IsLeader

func (n *Ncd) IsLeader() bool

IsLeader returns true, if the current node is a leader node

func (*Ncd) IsRunning

func (n *Ncd) IsRunning() bool

IsRunning returns true, if the Ncd is already running

func (*Ncd) Run

func (n *Ncd) Run()

Run ncd in foreground

func (*Ncd) RunProcess

func (n *Ncd) RunProcess()

Run ncd in background

func (*Ncd) SetLeader

func (n *Ncd) SetLeader(leader bool) *Ncd

SetLeader sets the current node into a leader mode

func (*Ncd) Stop

func (n *Ncd) Stop()

Stop ncd

type NcdConf

type NcdConf struct {
	Running bool
	Leader  bool
}

Directories

Path Synopsis
modules
eventmappers
To-be a plugin in a future.
To-be a plugin in a future.

Jump to

Keyboard shortcuts

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