keyvalue

package
v0.9.6 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(cc grpc.ClientConnInterface) *Client

func (Client) Get

func (k Client) Get(ctx context.Context, key string) ([]byte, error)

func (Client) PruneExpiredEntries added in v0.9.0

func (k Client) PruneExpiredEntries(ctx context.Context, maxAge time.Duration) (int64, error)

func (Client) Store

func (k Client) Store(ctx context.Context, key string, val []byte) error

type Server

type Server struct {
	pb.UnimplementedKeyValueStoreServer
	// contains filtered or unexported fields
}

func NewServer

func NewServer(impl core.KeyValueStore) *Server

func (Server) GetValueForKey

func (s Server) GetValueForKey(ctx context.Context, req *pb.GetValueForKeyRequest) (*pb.GetValueForKeyResponse, error)

func (Server) PruneExpiredEntries added in v0.9.0

func (Server) StoreKeyValue

func (s Server) StoreKeyValue(ctx context.Context, req *pb.StoreKeyValueRequest) (*emptypb.Empty, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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