daos

package module
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: May 18, 2023 License: Apache-2.0 Imports: 17 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Distributed array of structures (AoS)

Go Reference Build coverage

daos is a distributed, in-memory, key/value database. It is ACID compliant and supports custom indexes on json value. it's inspired by the design of cassandra. In a cluster of daos, there is no leader node as other distributed systems, so it's ideal for projects that need a distributed embedded cache.

Table of Contents

Click me to Open/Close the directory listing

Features

@todo

Samples

@ todo

FAQ

@todo

Documentation

Index

Constants

View Source
const (
	DefaultPort       = 7080
	DefaultPartitions = 1001
)
View Source
const (
	NotReadyErr = "not ready"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB interface {
	Set(k, v string) error
	SetWithTtl(k, v string, ttl time.Duration) error
	Get(k string) (string, time.Duration, error)
	Del(k string) error
	UpsertIndex(index query.Index) error
	DropIndex(name string) error
	Indexes() []query.Index
	Search(index string, criteria *query.Criteria) ([]query.Row, error)
	Shutdown()
	Name() string
}

func NewDB

func NewDB(option Option) (DB, error)

type Handler

type Handler func(ctx context.Context, dn *dataNode, cmd internal.Command)

type Option

type Option struct {
	// Local address to bind to
	Port int `json:",omitempty"`
	// JoinNodes all the members in the cluster
	JoinNodes []string `json:",omitempty"`
	// Replicas replication factor
	Replicas    int           `json:"replicas"`
	Timeout     time.Duration `json:"timeout"`
	Retry       int           `json:"retry"`
	Partitions  int           `json:"partitions"`
	GossipNodes int           `json:"gossipNodes"`
	Logger      *log.Logger
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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