Documentation ¶
Index ¶
- Constants
- Variables
- type API
- type Agent
- type AgentConfig
- type FeedArg
- type FeedResp
- type NodesArg
- type NodesResp
- type Nothing
- type PairsResp
- type PricesArg
- type PricesResp
- type Provider
- func (g *Provider) Models(pairs ...provider.Pair) (map[provider.Pair]*provider.Model, error)
- func (g *Provider) Pairs() ([]provider.Pair, error)
- func (g *Provider) Price(pair provider.Pair) (*provider.Price, error)
- func (g *Provider) Prices(pairs ...provider.Pair) (map[provider.Pair]*provider.Price, error)
- func (g *Provider) Start(ctx context.Context) error
- func (g *Provider) Wait() chan error
Constants ¶
View Source
const AgentLoggerTag = "PRICE_PROVIDER_AGENT"
Variables ¶
View Source
var ErrNotStarted = errors.New("price provider RPC client is not started")
Functions ¶
This section is empty.
Types ¶
type Agent ¶
type Agent struct {
// contains filtered or unexported fields
}
Agent creates and manages an RPC server for remote Provider calls.
func NewAgent ¶
func NewAgent(cfg AgentConfig) (*Agent, error)
NewAgent returns a new Agent instance.
type AgentConfig ¶
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider implements the provider.Provider interface. It uses a remote RPC server to fetch prices and models.
func NewProvider ¶
NewProvider returns a new Provider instance.
Click to show internal directories.
Click to hide internal directories.