consistenthash

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Card

type Card struct {
	Label, Value, Caption string
	Good, Bad             bool
}

Card / Readout — the verdict panel.

type Churn

type Churn struct {
	Consistent int
	Modulo     int
	Keys       int
	Added      int
}

Churn counts how many keys moved when a server was added, consistent vs modulo.

type Markdown

type Markdown string

func (Markdown) Render

func (m Markdown) Render() Rendered

type Readout

type Readout struct{ Cards []Card }

func (Readout) Render

func (r Readout) Render() Rendered

type Rendered

type Rendered struct{ MIME, Data string }

Rendered / Markdown.

type Ring

type Ring struct {
	Servers  []ServerTick
	KeyPos   []float64
	KeyOwner []int
}

Ring is the placed arrangement: server ticks (sorted), key positions, and each key's owning server id.

type RingChart

type RingChart struct {
	R       Ring
	Servers int
}

RingChart draws the ring: a circle, server ticks, and keys colored by owner.

func (RingChart) Render

func (rc RingChart) Render() Rendered

type ServerTick

type ServerTick struct {
	Pos    float64
	Server int
}

ServerTick is one virtual node on the ring: its position and which real server.

Jump to

Keyboard shortcuts

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