mongo

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Elector

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

func NewElector

func NewElector(key interface{}, col string, database *mongo.Database, docTooLaterDuration time.Duration) *Elector

func (*Elector) KeepLive

func (mgo *Elector) KeepLive(ctx context.Context, keepLive leader.KeepLive) error

func (*Elector) PostElection

func (mgo *Elector) PostElection(ctx context.Context, election leader.Election) error

func (*Elector) WaitElectionNotify

func (mgo *Elector) WaitElectionNotify(ctx context.Context) (leader.Election, error)

Jump to

Keyboard shortcuts

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