-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
50 lines (37 loc) · 1.47 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
protogen:
@./scripts/protogen.sh
launch:
@clear
@make clear
@go run main.go partition 8000 test
launch2:
@clear
@make clear
@go run main.go partition 7999 test2
blaunch:
@clear
@make clear
@go run main.go balancer 8001 1
# TO BALANCER
register-partition:
@echo '{"address": "127.0.0.1:8000"}' | grpcurl -d @ -v -plaintext localhost:8001 dkvs.balancer.BalancerService/RegisterPartition
# @echo '{"address": "127.0.0.1:7999"}' | grpcurl -d @ -v -plaintext localhost:8001 dkvs.balancer.BalancerService/RegisterPartition
setb:
@echo '{"key": "a2V5Lg==", "value": "ZGF0YQ==", "lamport": ${L}, "id": 1'} | grpcurl -d @ -v -plaintext localhost:8001 dkvs.balancer.BalancerService/Set
getb:
@echo '{"key": "a2V5Lg==", "lamport": ${L}, "id": 1}' | grpcurl -d @ -v -plaintext localhost:8001 dkvs.balancer.BalancerService/Get
get_id:
@echo '{}' | grpcurl -d @ -v -plaintext localhost:8001 dkvs.balancer.BalancerService/GetId
# TO PARTITION
shr:
@echo '{"min": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", "max": "/////////////////////w=="}' | grpcurl -d @ -v -plaintext localhost:8000 dkvs.partition.PartitionService/SetHashrange
set:
@echo '{"key": "a2V5Lg==", "value": "ZGF0YQ==", "lamport": ${L}}' | grpcurl -d @ -v -plaintext localhost:8000 dkvs.partition.PartitionService/Set
get:
@echo '{"key": "a2V5Lg==", "lamport": ${L}}' | grpcurl -d @ -v -plaintext localhost:8000 dkvs.partition.PartitionService/Get
clear:
@rm -rf test
@rm -rf test2
@rm -rf balancer-db
unit:
@go test -v ./...