message

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2021 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Election

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

Election message contains an array of previously visited server ids

func NewElection

func NewElection(id string) Election

NewElection returns an instance of an Election

func (*Election) AddNotified

func (e *Election) AddNotified(id string)

AddNotified appends a new value to the notified list

func (*Election) Exists

func (e *Election) Exists(id string) bool

Exists returns whether or not the id is in the notified list

func (*Election) GetHighest

func (e *Election) GetHighest() string

GetHighest will return the highest value in the notified list

func (*Election) NotifiedCount added in v0.2.1

func (e *Election) NotifiedCount() int

NotifiedCount gets the number of items in the notified list

type Notify

type Notify struct {
	Master string
	// contains filtered or unexported fields
}

Notify contains a notice to set your current master

func NewNotify added in v0.2.1

func NewNotify(id string) Notify

NewNotify creates a new instance of a Notify message

func (*Notify) AddVisited

func (e *Notify) AddVisited(id string)

AddVisited appends the input server id to the visited list

func (*Notify) Visited

func (e *Notify) Visited(id string) bool

Visited returns whether or not the id is in the visited list

Jump to

Keyboard shortcuts

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