Categorygithub.com/gl-works/ringpop-go
modulepackage
0.2.3
Repository: https://github.com/gl-works/ringpop-go.git
Documentation: pkg.go.dev

# README

ringpop-go

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

Run the tests by doing:

make

To run the test you need both thirft and thrift-gen on your path. On OSX you can install them with the following commands:

brew install thrift
go get github.com/uber/tchannel-go/thrift/thrift-gen

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
Package forward provides a mechanism to forward TChannel requests.
Package rbtree provides an implementation of a Red Black Tree.
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

# Functions

Channel is used to provide a TChannel instance that Ringpop should use for all communication.
DeserializeThrift takes a byte slice and attempts to write it into the given thrift struct using the thrift binary protocol.
HashRingConfig takes a `HashRingConfiguration` struct that can be used to configure the hash ring.
Identity is used to specify a static hostport string as this Ringpop instance's identity.
IdentityResolverFunc is used to specify a function that will called when the Ringpop instance needs to resolve its identity (typically, on bootstrap).
Logger is used to specify a bark-compatible logger that will be used for all Ringpop logging.
New returns a new Ringpop instance.
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.

# Variables

ErrNotBootstrapped is returned by public methods which require the ring to be bootstrapped before they can operate correctly.

# Structs

Arg is a blank arg.
HashRingConfiguration is a configuration struct that can be passed to the Ringpop constructor to customize hash ring options.
Ringpop is a consistent hashring that uses a gossip protocol to disseminate changes around the ring.

# Interfaces

HashRing is an interface for a hash ring that Ringpop uses for consistent hashing.
Interface specifies the public facing methods a user of ringpop is able to use.

# Type aliases

IdentityResolver is a function that returns the listen interface/port that Ringpop should identify as.
An Option is a modifier functions that configure/modify a real Ringpop object.