Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultOriginSet ¶
func DefaultOriginSet(pool query.WorkerPool) *origins.Set
func NewHandler ¶
func NewHandler(handlerType string, pool query.WorkerPool, params json.RawMessage) (origins.Handler, error)
nolint
Types ¶
type Config ¶
type Config struct { RPC RPC `json:"rpc"` Origins map[string]Origin `json:"origins"` PriceModels map[string]PriceModel `json:"priceModels"` }
func (*Config) ConfigureGofer ¶
ConfigureGofer returns a new Gofer instance.
func (*Config) ConfigureRPCAgent ¶
ConfigureRPCAgent returns a new rpc.Agent instance.
type ErrCyclicReference ¶
func (ErrCyclicReference) Error ¶
func (e ErrCyclicReference) Error() string
type MedianPriceModel ¶
type MedianPriceModel struct {
MinSourceSuccess int `json:"minimumSuccessfulSources"`
}
type Origin ¶
type Origin struct { Type string `json:"type"` Name string `json:"name"` 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.