priamCassandra

package
v0.0.0-...-168b963 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2016 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package priamCassandra simulates a cassandra cluster with NetflixOSS Priam Takes incoming traffic and calls into cross zone and cross region nodes

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Distribute

func Distribute(cass map[string]chan gotocol.Message) string

Distribute tokens to one zone of a cassandra cluster, this doesn't yet allow for clusters to grow or replace nodes

func Start

func Start(listener chan gotocol.Message)

Start priamCassandra, all configuration and state is sent via messages

Types

type ByToken

type ByToken []node

ByToken ring of node names sorted by token

func RingConfig

func RingConfig(m string) ByToken

RingConfig gets the tokens for a ring

func (ByToken) Find

func (a ByToken) Find(h uint32) int

Find the node in the ring for a token

func (ByToken) Len

func (a ByToken) Len() int

implement node array sortable by Token interface

func (ByToken) Less

func (a ByToken) Less(i, j int) bool

func (ByToken) Swap

func (a ByToken) Swap(i, j int)

Jump to

Keyboard shortcuts

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