leadership

package
v0.1.19-b Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

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

Manager is the node manager responsible for managing the online nodes

func NewManager

func NewManager(lr repo.LockedRepo, ec *etcdcli.Client, configFunc dtypes.GetSchedulerConfigFunc) (*Manager, error)

NewManager creates a new instance of the node manager

func (*Manager) RequestAndBecomeMaster

func (m *Manager) RequestAndBecomeMaster() bool

RequestAndBecomeMaster tries to acquire a lock from etcd. If the lock is successfully acquired, the function sets the server as the master and returns true. Otherwise, it returns false.

Jump to

Keyboard shortcuts

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