flow-go-sdk icon indicating copy to clipboard operation
flow-go-sdk copied to clipboard

Client connection docs improvement

Open devbugging opened this issue 3 years ago • 0 comments

We should extend our docs to cover different options when connecting with the client:

  • Option to connect using secure connection
  • Option to connect using the retries as stated bellow:
opts := []grpc_retry.CallOption{
  grpc_retry.WithBackoff(grpc_retry.BackoffExponential(100 * time.Millisecond)),
}

c, err := client.New(
  "access.mainnet.nodes.onflow.org:9000",
  grpc.WithUnaryInterceptor(grpc_retry.UnaryClientInterceptor(opts...)),
)

devbugging avatar Feb 23 '22 13:02 devbugging