adaptors

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: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMd5Hash

func NewMd5Hash() ports.ConsistentHash

func NewSimpleCache

func NewSimpleCache() ports.Storage

Types

type LamportClock

type LamportClock struct {
	sync.Mutex
	// contains filtered or unexported fields
}

LamportClock is a partial-order clock implementing ports.ILamportClock

func NewLamportClock

func NewLamportClock() *LamportClock

func (*LamportClock) Tick

func (l *LamportClock) Tick() uint64

func (*LamportClock) Time

func (l *LamportClock) Time() uint64

func (*LamportClock) Witness

func (l *LamportClock) Witness(t uint64) bool

type SimpleCache

type SimpleCache struct {
	// contains filtered or unexported fields
}

SimpleCache implements ports.Storage

func (*SimpleCache) Del

func (c *SimpleCache) Del(key string) error

func (*SimpleCache) Get

func (c *SimpleCache) Get(key string) (string, error)

func (*SimpleCache) Put

func (c *SimpleCache) Put(key, value string) error

Jump to

Keyboard shortcuts

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