ports

package
v0.0.0-...-70736be Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2023 License: GPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConsistentHash

type ConsistentHash interface {
	Hash(string) []byte
	IntFromHash([]byte) int
}

ConsistentHash provides tools for consistent hashing.

type ILamportClock

type ILamportClock interface {
	// Witness is called to update the local time with the received time from other processes.
	// returns true if witnessed a new time.
	Witness(Ltime) bool
	// Time returns the current local lamport time
	Time() Ltime
	// Tick adds 1 unit to the clock
	Tick() Ltime
}

type Ltime

type Ltime uint64

type Storage

type Storage interface {
	Get(key string) (string, error)
	Put(key, value string) error
	Del(key string) error
}

Storage is only working with strings, for now!

Jump to

Keyboard shortcuts

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