Categorygithub.com/tehsphinx/quasar
modulepackage
0.2.11
Repository: https://github.com/tehsphinx/quasar.git
Documentation: pkg.go.dev

# README

Quasar Cache

Quasar Cache implements a distributed embeddable Go cache with eventual consistency based on the RAFT consensus.

State

This library is currently in development and is not ready to be used in production.

# Packages

Package cond implements a customized sync.Cond.
Package discoveries contains different discovery implementations for the quasar cache.
No description provided by the author
No description provided by the author
Package stores implements different stores for the quasar cache.
Package transports contains different transport implementations for the quasar cache.

# Functions

NewCache instantiates a new Cache.
NewKVCache creates a new key-value based cache.
WaitForUID adds a raft uid to be applied before reading a value.
WithBootstrap bootstraps the server just with itself starting a one node cluster of the cache.
WithDiscovery can be used to pass in a server discovery.
WithKVStore sets the kv store to use.
WithLocalID sets the id of this server.
WithName sets the name of the cache.
WithNatsTransport provides a simplified way to use NATS based RAFT communication.
WithPersistentStore sets the persistent store to use.
WithRaftConfig allows passing in a custom raft configuration.
WithServers can be used to bootstrap the cluster with multiple nodes.
WithSuffrage can be used to configure a cache instance to be a raft.Nonvoter.
WithTCPTransport provides a simplified way to use tcp based RAFT communication.
WithTransport provides a way to set a custom transport.

# Variables

ErrNoLeader defines an error returned if there is no leader.

# Structs

Cache implements the quasar cache.
DiscoveryInjector provides access to the underlying cache in a Discovery implementation.
FSMInjector implements an object the FSM implementation gets access to, to control the data relevant part of the cache.
KVCache implements a key-value based cache.

# Interfaces

Discovery defines a auto discovery for servers of the cache.
FSM defines the fsm to be implemented for the quasar cache.

# Type aliases

LoadOption defines functional option to be applied to load functions.
Option defines a functional option to be applied to a cache instantiation.