events

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2016 License: MIT Imports: 1 Imported by: 62

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Destroyed added in v0.4.0

type Destroyed struct{}

Destroyed is fired when ringpop has been destroyed and should not be responding to requests or lookup requests.

type Event

type Event interface{}

Event is an empty interface that is type switched when handeled.

type EventListener

type EventListener interface {
	HandleEvent(event Event)
}

An EventListener handles events given to it by the Ringpop, as well as forwarded events from the SWIM node contained by the ringpop. HandleEvent should be thread safe.

type EventRegistrar added in v0.5.0

type EventRegistrar interface {
	RegisterListener(EventListener)
}

EventRegistrar is an object that you can register EventListeners on.

type LookupEvent

type LookupEvent struct {
	Key      string
	Duration time.Duration
}

A LookupEvent is sent when a lookup is performed on the Ringpop's ring

type LookupNEvent added in v0.6.0

type LookupNEvent struct {
	Key      string
	N        int
	Duration time.Duration
}

A LookupNEvent is sent when a lookupN is performed on the Ringpop's ring

type Ready added in v0.4.0

type Ready struct{}

Ready is fired when ringpop has successfully bootstrapped and is ready to receive requests and other method calls.

type RingChangedEvent

type RingChangedEvent struct {
	ServersAdded   []string
	ServersRemoved []string
}

A RingChangedEvent is sent when servers are added and/or removed from the ring

type RingChecksumEvent

type RingChecksumEvent struct {
	OldChecksum uint32
	NewChecksum uint32
}

RingChecksumEvent is sent when a server is removed or added and a new checksum for the ring is calculated

Directories

Path Synopsis
test

Jump to

Keyboard shortcuts

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