Categorygithub.com/uber/ringpop-go
modulepackage
0.10.0
Repository: https://github.com/uber/ringpop-go.git
Documentation: pkg.go.dev

# README

ringpop-go Build Status Coverage Status

(This project is no longer under active development.)

Ringpop is a library that brings cooperation and coordination to distributed applications. It maintains a consistent hash ring on top of a membership protocol and provides request forwarding as a routing convenience. It can be used to shard your application in a way that's scalable and fault tolerant.

Getting started

To install ringpop-go:

go get github.com/uber/ringpop-go

Developing

First make certain that thrift (OSX: brew install thrift) and glide are in your path (above). Then,

make setup

to install remaining golang dependencies and install the pre-commit hook.

Finally, run the tests by doing:

make test

Documentation

Interested in where to go from here? Read the docs at ringpop.readthedocs.org

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
Package forward provides a mechanism to forward TChannel requests.
Package hashring provides a hashring implementation that uses a red-black Tree.
No description provided by the author
No description provided by the author
Package replica extends Ringpop functionality by providing a mechanism to replicate a request to multiple nodes in the ring.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Functions

Address is used to specify a static hostport string as this Ringpop instance's address.
AddressResolverFunc is used to specify a function that will be called when the Ringpop instance needs to resolve its address (typically, on bootstrap).
Channel is used to provide a TChannel instance that Ringpop should use for all communication.
Clock is used to set the Clock mechanism.
DeserializeThrift takes a byte slice and attempts to write it into the given thrift struct using the thrift binary protocol.
FaultyPeriod configures the period Ringpop keeps a faulty node in its memberlist.
HashRingConfig takes a `HashRingConfiguration` struct that can be used to configure the hash ring.
Identity can be used to specify a custom string as the unique identifier for this node.
LabelLimitCount limits the number of labels an application can set on this node.
LabelLimitKeySize limits the size that a key of a label can be.
LabelLimitValueSize limits the size that a value of a label can be.
Logger is used to specify a bark-compatible logger that will be used for all Ringpop logging.
LogLevels is used to set the severity log level for all Ringpop named loggers.
MembershipChecksumStatPeriod configures the period between emissions of the stat 'membership.checksum-periodic'.
New returns a new Ringpop instance.
NodeOverride is used to optionally override the default SWIM-based gossip-style node membership protocol used for membership management.
RequiresAppInPing configures if ringpop node should reject pings that don't contain app name.
RingChecksumStatPeriod configures the period between emissions of the stat 'ring.checksum-periodic'.
SelfEvictPingRatio configures the maximum percentage/ratio of the members to actively ping while self evicting.
SerializeThrift takes a thrift struct and returns the serialized bytes of that struct using the thrift binary protocol.
Statter is used to specify a bark-compatible (bark.StatsReporter) stats reporter that will be used to record ringpop stats.
SuspectPeriod configures the period it takes ringpop to declare a node faulty after ringpop has first detected the node to be unresponsive to a healthcheck.
TombstonePeriod configures the period of the last time of the lifecycle in of a node in the membership list.

# Constants

StatPeriodDefault defines the default emission period for a periodic stat.
StatPeriodNever defines a "period" which disables a periodic stat emission.

# Variables

ErrChannelNotListening is returned on bootstrap if TChannel is not listening.
ErrEphemeralAddress is returned by the address resolver if TChannel is using port 0 and is not listening (and thus has not been assigned a port by the OS).
ErrInvalidIdentity is returned when the identity value is invalid.
ErrNotBootstrapped is returned by public methods which require the ring to be bootstrapped before they can operate correctly.

# Structs

Arg is a blank arg.
Ringpop is a consistent hashring that uses a gossip protocol to disseminate changes around the ring.

# Interfaces

Interface specifies the public facing methods a user of ringpop is able to use.

# Type aliases

AddressResolver is a function that returns the listen interface/port that Ringpop should use as its address.
An Option is a modifier functions that configure/modify a real Ringpop object.