distcache

package module
v0.0.0-...-a0625f0 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2018 License: MIT Imports: 10 Imported by: 0

README

distcache

Build Status GoDoc Go Report Card codecov

A simple, distributed in-memory embedded cache

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RPCServer

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

func NewRPCServer

func NewRPCServer(addr string, opts ...grpc.ServerOption) (*RPCServer, error)

func (*RPCServer) Addr

func (r *RPCServer) Addr() net.Addr

func (*RPCServer) Peers

func (r *RPCServer) Peers() *peers

func (*RPCServer) Start

func (r *RPCServer) Start()

func (*RPCServer) Stop

func (r *RPCServer) Stop()

func (*RPCServer) Trxn

func (r *RPCServer) Trxn(ctx context.Context, req *pb.Request) (*pb.Response, error)

Trxn determines the locality of the cache transaction by performing a consistent hash over the requested key. If the key is not on the local instance a grpc call to the remote server is made.

Directories

Path Synopsis
Package distcachepb is a generated protocol buffer package.
Package distcachepb is a generated protocol buffer package.

Jump to

Keyboard shortcuts

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