coordinator

package
v0.0.0-...-12f838c Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckClockDrift

func CheckClockDrift(coordinator Coordinator) error

check time

func Reporter

func Reporter(coordinator Coordinator)

reporter

Types

type ClockDriftChecker

type ClockDriftChecker interface {
	CheckOtherNodes(Coordinator) error
}

type Coordinator

type Coordinator interface {
	GetWorkerId() (uint64, error)
	GetLeastTime() (int64, error)
	ReportTime(int64) error
	GetAllTimes() (map[string]int64, error)
}

func NewCoordinator

func NewCoordinator() (Coordinator, error)

type ETCDClockDriftChecker

type ETCDClockDriftChecker struct {
}

func (ETCDClockDriftChecker) CheckOtherNodes

func (ETCDClockDriftChecker) CheckOtherNodes(coordinator Coordinator) error

type NoClockDriftChecker

type NoClockDriftChecker struct {
}

func (NoClockDriftChecker) CheckOtherNodes

func (NoClockDriftChecker) CheckOtherNodes(coordinator Coordinator) error

type StoreClockDriftChecker

type StoreClockDriftChecker struct {
}

func (StoreClockDriftChecker) CheckOtherNodes

func (StoreClockDriftChecker) CheckOtherNodes(coordinator Coordinator) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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