325a70d514
* add reference to dht to overlay client struct * wip * wip * Implement FindNode * get nodes * WIP * Merge in Dennis kademlia code, get it working with our code * ping and moar * WIP trying to get cache working with kademlia * WIP more wiring up * WIP * Update service cli commands * WIP * added GetNodes * added nodes to Kbucket * default transport changed to TCP * GetBuckets interface changed * filling in more routing * timestamp methods * removed store * Added initial network overlay explorer page * Updating and building with dockerfile * Working on adding bootstrap node code * WIP merging in dennis' code * WIP * connects cache to pkg/kademlia implementation * WIP redis cache * testing * Add bootstrap network function for CLI usage * cleanup * call bootstrap on init network * Add BootstrapNetwork function to interface * Merge in dennis kad code * WIP updates to redis/overlay client interface * WIP trying to get the DHT connected to the cache * go mod & test * deps * Bootstrap node now setting up correctly - Need to pass it through CLI commands better * WIP adding refresh and walk functions, added cli flags - added cli flags for custom bootstrap port and ip * PR comments addressed * adding FindStorageNodes to overlay cache * fix GetBucket * using SplitHostPort * Use JoinHostPort * updates to findstoragenodes response and request * WIP merge in progress, having issues with a panic * wip * adjustments * update port for dht bootstrap test * Docker * wip * dockerfile * fixes * makefile changes * Update port in NewKademlia call * Update local kademlia DHT config * kubernetes yaml * cleanup * making tests pass * k8s yaml * lint issues * Edit cli flags to allow for configurable bootstrap IP and Port args * cleanup * cache walking the network now * Rough prototype of Walk function laid out * Move walk function into bootstrap function * Update dht.go * changes to yaml * goimports
64 lines
1.2 KiB
Makefile
64 lines
1.2 KiB
Makefile
.PHONY: test lint proto check-copyrights build-dev-deps
|
|
|
|
lint: check-copyrights
|
|
@echo "Running ${@}"
|
|
@gometalinter \
|
|
--deadline=170s \
|
|
--disable-all \
|
|
--enable=golint \
|
|
--enable=goimports \
|
|
--enable=vet \
|
|
--enable=deadcode \
|
|
--enable=goconst \
|
|
--exclude=.*\.pb\.go \
|
|
--exclude=.*_test.go \
|
|
./...
|
|
|
|
check-copyrights:
|
|
@echo "Running ${@}"
|
|
@./scripts/check-for-header.sh
|
|
|
|
proto:
|
|
@echo "Running ${@}"
|
|
./scripts/build-protos.sh
|
|
|
|
build-dev-deps:
|
|
go get github.com/golang/protobuf/protoc-gen-go
|
|
go get github.com/alecthomas/gometalinter
|
|
gometalinter --install --force
|
|
|
|
test: lint
|
|
go install -v ./...
|
|
go test ./...
|
|
@echo done
|
|
|
|
build-binaries:
|
|
docker build -t overlay .
|
|
|
|
run-overlay:
|
|
docker network create test-net
|
|
|
|
docker run -d \
|
|
--name redis \
|
|
--network test-net \
|
|
-p 127.0.0.1:6379:6379 \
|
|
redis
|
|
|
|
docker run -d \
|
|
--name=overlay \
|
|
--network test-net \
|
|
-e REDIS_ADDRESS=redis:6379 \
|
|
-e REDIS_PASSWORD="" \
|
|
-e REDIS_DB=1 \
|
|
-e OVERLAY_PORT=8080 \
|
|
overlay
|
|
|
|
clean-local:
|
|
# cleanup overlay
|
|
docker stop overlay || true
|
|
docker rm overlay || true
|
|
# cleanup redis
|
|
docker stop redis || true
|
|
docker rm redis || true
|
|
# cleanup docker network
|
|
docker network rm test-net || true
|