Skip to content

Commit

Permalink
examples: update Go version and dependencies in example golang project
Browse files Browse the repository at this point in the history
  • Loading branch information
mhughdo committed Oct 23, 2024
1 parent 5096395 commit f3f179a
Show file tree
Hide file tree
Showing 6 changed files with 263 additions and 2,071 deletions.
14 changes: 7 additions & 7 deletions examples/golang/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,27 @@ This example can contains errors or be behind of the latest stable version, plea

This is a sample golang client for the Solana gRPC interface.

Requires golang 1.17
Requires golang 1.21

Sample usage:

```
go1.17 run ./cmd/grpc-client/ -endpoint https://api.rpcpool.com:443 -x-token <token> -slots
go run ./cmd/grpc-client/ -endpoint https://api.rpcpool.com:443 -x-token <token> -slots
```

You can also make non SSL connections:

```
go1.17 run ./cmd/grpc-client/ -endpoint http://api.rpcpool.com:80 -x-token <token> -blocks
````
go run ./cmd/grpc-client/ -endpoint http://api.rpcpool.com:80 -x-token <token> -blocks
```

## Updating protofiles

Make sure you have protoc installed for go:
Make sure you have the Protocol Buffer compiler (protoc) and its plugins installed for Go:

```
$ go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.28
$ go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.2
$ go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.35.1
$ go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.5.1
```

If you have `dnf` package manager:
Expand Down
13 changes: 6 additions & 7 deletions examples/golang/go.mod
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
module github.com/rpcpool/yellowstone-grpc/examples/golang

go 1.17
go 1.21

require (
golang.org/x/net v0.5.0 // indirect
golang.org/x/net v0.28.0 // indirect
google.golang.org/genproto v0.0.0-20230202175211-008b39050e57 // indirect
google.golang.org/grpc v1.52.3
google.golang.org/protobuf v1.28.1
google.golang.org/grpc v1.67.1
google.golang.org/protobuf v1.35.1
)

require (
github.com/golang/protobuf v1.5.2 // indirect
golang.org/x/sys v0.4.0 // indirect
golang.org/x/text v0.6.0 // indirect
golang.org/x/sys v0.24.0 // indirect
golang.org/x/text v0.17.0 // indirect
)
Loading

0 comments on commit f3f179a

Please sign in to comment.