Documentation ¶
Index ¶
- func NewHandler(origin string, wp query.WorkerPool, clients ethereum.ClientRegistry, ...) (origins.Handler, error)
- type AgentDependencies
- type AsyncDependencies
- type Config
- func (c *Config) AsyncPriceProvider(d AsyncDependencies) (provider.Provider, error)
- func (c *Config) ConfigureDataProvider(d Dependencies) (datapoint.Provider, error)
- func (c *Config) PriceHook(d HookDependencies) (provider.PriceHook, error)
- func (c *Config) PriceProvider(d Dependencies, noRPC bool) (provider.Provider, error)
- func (c *Config) RPCAgent(d AgentDependencies) (*rpc.Agent, error)
- type Dependencies
- type HookDependencies
- type Provider
- func (p *Provider) DataPoint(_ context.Context, model string) (datapoint.Point, error)
- func (p *Provider) DataPoints(_ context.Context, models ...string) (map[string]datapoint.Point, error)
- func (p *Provider) Model(_ context.Context, model string) (datapoint.Model, error)
- func (p *Provider) ModelNames(_ context.Context) []string
- func (p *Provider) Models(_ context.Context, models ...string) (map[string]datapoint.Model, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewHandler ¶
func NewHandler( origin string, wp query.WorkerPool, clients ethereum.ClientRegistry, params map[string]any, ) (origins.Handler, error)
Types ¶
type AgentDependencies ¶
type AsyncDependencies ¶
type AsyncDependencies struct { Clients ethereumConfig.ClientRegistry Logger log.Logger }
type Config ¶
type Config struct { // RPCListenAddr is the address on which the RPC server will listen. RPCListenAddr string `hcl:"rpc_listen_addr,optional"` // RPCAgentAddr is the address of the RPC agent. RPCAgentAddr string `hcl:"rpc_agent_addr,optional"` // Origins is a configuration of price origins. Origins []configOrigin `hcl:"origin,block"` // PriceModels is a configuration of price models. PriceModels []configSource `hcl:"price_model,block"` // Hooks is a configuration of hooks. Hooks []configHook `hcl:"hook,block"` // HCL fields: Range hcl.Range `hcl:",range"` Content hcl.BodyContent `hcl:",content"` // contains filtered or unexported fields }
func (*Config) AsyncPriceProvider ¶
func (c *Config) AsyncPriceProvider(d AsyncDependencies) (provider.Provider, error)
AsyncPriceProvider returns a new async gofer instance.
func (*Config) ConfigureDataProvider ¶ added in v0.11.0
func (c *Config) ConfigureDataProvider(d Dependencies) (datapoint.Provider, error)
func (*Config) PriceHook ¶
func (c *Config) PriceHook(d HookDependencies) (provider.PriceHook, error)
func (*Config) PriceProvider ¶
PriceProvider returns a new async gofer instance.
type Dependencies ¶
type Dependencies struct { Clients ethereumConfig.ClientRegistry Logger log.Logger }
type HookDependencies ¶
type HookDependencies struct { Context context.Context Clients ethereumConfig.ClientRegistry }
type Provider ¶ added in v0.11.0
type Provider struct {
// contains filtered or unexported fields
}
func (*Provider) DataPoints ¶ added in v0.11.0
func (*Provider) ModelNames ¶ added in v0.11.0
Click to show internal directories.
Click to hide internal directories.