Documentation ¶
Index ¶
- func NewHandler(origin string, wp query.WorkerPool, cli pkgEthereum.Client, baseURL string, ...) (origins.Handler, error)
- type ErrCyclicReference
- type Gofer
- func (c *Gofer) ConfigureAsyncGofer(cli pkgEthereum.Client, logger log.Logger) (gofer.StartableGofer, error)
- func (c *Gofer) ConfigureGofer(cli pkgEthereum.Client, logger log.Logger, noRPC bool) (gofer.Gofer, error)
- func (c *Gofer) ConfigureRPCAgent(cli pkgEthereum.Client, gof gofer.Gofer, logger log.Logger) (*rpc.Agent, error)
- type MedianPriceModel
- type Origin
- type PriceModel
- type RPC
- type Source
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewHandler ¶
func NewHandler( origin string, wp query.WorkerPool, cli pkgEthereum.Client, baseURL string, params json.RawMessage, ) (origins.Handler, error)
Types ¶
type ErrCyclicReference ¶
func (ErrCyclicReference) Error ¶
func (e ErrCyclicReference) Error() string
type Gofer ¶
type Gofer struct { RPC RPC `json:"rpc"` Origins map[string]Origin `json:"origins"` PriceModels map[string]PriceModel `json:"priceModels"` }
func (*Gofer) ConfigureAsyncGofer ¶ added in v0.4.4
func (c *Gofer) ConfigureAsyncGofer(cli pkgEthereum.Client, logger log.Logger) (gofer.StartableGofer, error)
ConfigureAsyncGofer returns a new async gofer instance.
type MedianPriceModel ¶
type MedianPriceModel struct {
MinSourceSuccess int `json:"minimumSuccessfulSources"`
}
type Origin ¶
type Origin struct { Type string `json:"type"` Name string `json:"name"` URL string `json:"url"` Params json.RawMessage `json:"params"` }
type PriceModel ¶
type PriceModel struct { Method string `json:"method"` Sources [][]Source `json:"sources"` Params json.RawMessage `json:"params"` TTL int `json:"ttl"` }
Click to show internal directories.
Click to hide internal directories.