Documentation ¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
Getter
}
Client is a address client that allows access to the get address HTTP calls to a Raiden node.
type Getter ¶
Getter is a generic interface to list the Ethereum address associated to the Raiden node. It allows for a context to be passed to allow for request timeouts and/or deadlines on the response.
Example ¶
var ( addressClient *Client config = &config.Config{ Host: "http://localhost:5001", APIVersion: "v1", } address common.Address err error ) addressClient = NewClient(config, http.DefaultClient) if address, err = addressClient.Get(context.Background()); err != nil { panic(fmt.Sprintf("unable to get ethereum address from raiden node: %s", err.Error())) } fmt.Println("raiden address:", address.String())
Output:
Click to show internal directories.
Click to hide internal directories.