leaderhealth

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2020 License: BSD-2-Clause Imports: 4 Imported by: 18

Documentation

Overview

Package leaderhealth is included in your Raft nodes to expose whether this node is the leader.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Report

func Report(r *raft.Raft, hs *health.Server, services []string)

Report starts a goroutine that updates the given health.Server with whether we are the Raft leader. It will set the given services as SERVING if we are the leader, and as NOT_SERVING otherwise.

func Setup

func Setup(r *raft.Raft, s *grpc.Server, services []string)

Setup creates a new health.Server for you and registers it on s. It's a convenience wrapper around Report.

Types

This section is empty.

Jump to

Keyboard shortcuts

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