Version: v0.2.0 Latest Latest

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

Go to latest
Published: Sep 23, 2017 License: GPL-3.0 Imports: 13 Imported by: 0




View Source
const DateFormat = "2006-01-02 15:04:05"

DateFormat defines a format to output logging information.


This section is empty.


func CmdRun

func CmdRun(c *cli.Context) (err error)

CmdRun runs a simple KVS server.


type Server

type Server struct {
	// Root is a path to the document root.
	Root string
	// Compress stored data.
	Compress bool
	// Log is a writer to output logging information.
	Log io.Writer

Server defines a KVS server.

func (*Server) Delete

func (s *Server) Delete(ctx context.Context, key *kvs.Key) (res *kvs.DeleteResponse, err error)

Delete deletes a given file.

func (*Server) Get

func (s *Server) Get(ctx context.Context, key *kvs.Key) (res *kvs.Value, err error)

Get returns a value associated with the given key.

func (*Server) List

func (s *Server) List(_ *kvs.ListRequest, server kvs.Kvs_ListServer) error

List lists up items stored in this KVS.

func (*Server) Put

func (s *Server) Put(ctx context.Context, entry *kvs.Entry) (*kvs.PutResponse, error)

Put stores a given entry as a file.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL