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 ethereum.Client, logger log.Logger) (provider.Provider, error)
- func (c *Gofer) ConfigureGofer(cli ethereum.Client, logger log.Logger, noRPC bool) (provider.Provider, error)
- func (c *Gofer) ConfigurePriceHook(ctx context.Context, cli ethereum.Client) (provider.PriceHook, error)
- func (c *Gofer) ConfigureRPCAgent(cli ethereum.Client, gof provider.Provider, 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"` // Old configuration format, to remove in the future. RPCListenAddr string `json:"rpcListenAddr"` Origins map[string]Origin `json:"origins"` PriceModels map[string]PriceModel `json:"priceModels"` }
func (*Gofer) ConfigureAsyncGofer ¶
func (c *Gofer) ConfigureAsyncGofer(cli ethereum.Client, logger log.Logger) (provider.Provider, error)
ConfigureAsyncGofer returns a new async gofer instance.
func (*Gofer) ConfigureGofer ¶
func (c *Gofer) ConfigureGofer(cli ethereum.Client, logger log.Logger, noRPC bool) (provider.Provider, error)
ConfigureGofer returns a new async gofer instance.
func (*Gofer) ConfigurePriceHook ¶
type MedianPriceModel ¶
type Origin ¶
type Origin struct { Type string `json:"type"` URL string `json:"url"` // TODO: Move it to the params field. 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.