demory

package module
v0.0.0-...-94d2ec4 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2022 License: Apache-2.0 Imports: 19 Imported by: 0

README

demory logo

Demory is a Cloud-Native Distributed In-Memory Database based on the RAFT Protocol.

GoDoc Go Report Card Maintainability Test Coverage Docker Image Version (latest by date)

Howto Use

Demory is still in progress, will be updated soon

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Demory

type Demory struct {
	proto.UnimplementedDemoryServer
	// contains filtered or unexported fields
}

Demory is for representing data structure storage It also has basic api interface for data operations.

func New

func New() *Demory

New for creating new instance of in-memory database.

func (*Demory) CacheClear

func (d *Demory) CacheClear(ctx context.Context, req *proto.CacheClearRequest) (*emptypb.Empty, error)

CacheClear clears all the entries in cache specified with name

func (*Demory) CacheGet

CacheGet retrieves data from store.

func (*Demory) CachePut

func (d *Demory) CachePut(ctx context.Context, req *proto.CachePutRequest) (*emptypb.Empty, error)

CachePut saves data into store.

func (*Demory) CacheRemove

func (d *Demory) CacheRemove(ctx context.Context, req *proto.CacheRemoveRequest) (*emptypb.Empty, error)

Remove removes the value at specified key

func (*Demory) JoinToCluster

func (d *Demory) JoinToCluster(ctx context.Context, request *proto.JoinToClusterRequest) (*proto.JoinToClusterResponse,
	error)

JoinToCluster is used by port discovery to allow joining cluster by using leader node.

func (*Demory) MapClear

func (d *Demory) MapClear(ctx context.Context, req *proto.MapClearRequest) (*emptypb.Empty, error)

MapClear clears all the entries in map specified with name

func (*Demory) MapGet

MapGet retrieves data from store.

func (*Demory) MapPut

func (d *Demory) MapPut(ctx context.Context, req *proto.MapPutRequest) (*emptypb.Empty, error)

MapPut saves data into store.

func (*Demory) MapPutIfAbsent

func (d *Demory) MapPutIfAbsent(ctx context.Context, req *proto.MapPutIfAbsentRequest) (*emptypb.Empty, error)

MapPutIfAbsent inserts value at specified key if there is no value

func (*Demory) MapRemove

func (d *Demory) MapRemove(ctx context.Context, req *proto.MapRemoveRequest) (*emptypb.Empty, error)

MapRemove removes the value at specified key

func (*Demory) Run

func (d *Demory) Run()

Directories

Path Synopsis
ds

Jump to

Keyboard shortcuts

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