Code Monkey home page Code Monkey logo

kvstore's Introduction

KVStore

Learning a variety of tree structures by creating a k-v store database.

Build

Prepare

This project using grpc to communicate from kvctl to kvd, we need protobuf and protoc-gen-go installed.

# on debian like linux system
sudo apt install -y protobuf-compiler

export GO111MODULE=on  # Enable module mode
go get github.com/golang/protobuf/protoc-gen-go
go get google.golang.org/grpc/cmd/[email protected]

export PATH="$PATH:$(go env GOPATH)/bin"
grpc

we are using gogo protobuf library

https://github.com/gogo/protobuf

go get github.com/gogo/protobuf/protoc-gen-gofast

# we using this repo's proto files
git clone https://github.com/googleapis/googleapis

# generate pb.go file
protoc -I=. -I=$GOPATH/pkg/mod/github.com/gogo/[email protected] -I/mnt/e/Develop/Projects/GitHub/googleapis --gofast_out=plugins=grpc:. rpc.proto

# same as
protoc -I . \
	-I=$GOPATH/pkg/mod/github.com/gogo/[email protected] \
	-I/mnt/e/Develop/Projects/GitHub/googleapis \
	--grpc-gateway_out . \
	--grpc-gateway_opt logtostderr=true \
	--grpc-gateway_opt paths=source_relative \
	--grpc-gateway_opt generate_unbound_methods=true \
	rpc.proto

# https://github.com/googleapis/go-genproto
go get google.golang.org/genproto/...

kvstore's People

Contributors

m3c4j avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

kvstore's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.