Skip to content

Latest commit

 

History

History
 
 

fetcher

Fetcher

GoDoc

The Fetcher package provides a simplified client interface to communicate with a Rosetta server. It also provides automatic retries and concurrent block fetches.

If you want a lower-level interface to communicate with a Rosetta server, check out the Client.

Installation

go get github.com/coinbase/rosetta-sdk-go/fetcher

Create a Fetcher

Creating a basic Fetcher is as easy as providing a context and Rosetta server URL:

fetcher := fetcher.New(ctx, serverURL)

It is also possible to provide a series of optional arguments that override default behavior. For example, it is possible to override the concurrency for making block requests:

fetcher := fetcher.New(ctx, serverURL, fetcher.WithBlockConcurrency(10))

More Examples

Check out the examples to see how easy it is to connect to a Rosetta server.