generated from multiversx/mx-chain-ws-connector-template-go
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22 from multiversx/grpc-streaming-updates
gRPC streaming updates
- Loading branch information
Showing
17 changed files
with
2,274 additions
and
1,705 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ SHELL := $(shell which bash) | |
|
||
debugger := $(shell which dlv) | ||
|
||
.PHONY: help build run runb kill debug debug-ath | ||
.PHONY: help build run runb kill debug debug-ath protogen proto-install | ||
|
||
cmd_dir = cmd/connector | ||
binary = connector | ||
|
@@ -22,3 +22,13 @@ debug: build | |
test: | ||
@echo " > Running unit tests" | ||
go test -cover -race -coverprofile=coverage.txt -covermode=atomic -v ./... | ||
|
||
proto-install: | ||
go install google.golang.org/protobuf/cmd/[email protected] | ||
go install google.golang.org/grpc/cmd/[email protected] | ||
|
||
protogen: | ||
protoc \ | ||
--go_out=. --go_opt=paths=source_relative \ | ||
--go-grpc_out=. --go-grpc_opt=paths=source_relative \ | ||
data/hyperOutportBlocks/hyperOutportBlock.proto data/hyperOutportBlocks/grpcBlockService.proto |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
syntax = "proto3"; | ||
|
||
package proto; | ||
|
||
import "google/protobuf/duration.proto"; | ||
|
||
import "data/hyperOutportBlocks/hyperOutportBlock.proto"; | ||
|
||
option go_package = "github.com/multiversx/mx-chain-ws-connector-firehose-go/data/hyperOutportBlocks"; | ||
|
||
message BlockHashRequest { | ||
string hash = 1; | ||
} | ||
|
||
message BlockHashStreamRequest { | ||
string hash = 1; | ||
google.protobuf.Duration pollingInterval = 2; | ||
} | ||
|
||
message BlockNonceRequest { | ||
uint64 nonce = 1; | ||
} | ||
|
||
message BlockNonceStreamRequest { | ||
uint64 nonce = 1; | ||
google.protobuf.Duration pollingInterval = 2; | ||
} | ||
|
||
service BlockStream { | ||
rpc BlocksByHash(BlockHashStreamRequest) returns (stream proto.HyperOutportBlock) {} | ||
rpc BlocksByNonce(BlockNonceStreamRequest) returns (stream proto.HyperOutportBlock) {} | ||
} | ||
|
||
service BlockFetch { | ||
rpc GetBlockByHash(BlockHashRequest) returns (HyperOutportBlock) {} | ||
rpc GetBlockByNonce(BlockNonceRequest) returns (proto.HyperOutportBlock) {} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.