Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AsyncGofer ¶
type AsyncGofer struct { *Gofer // contains filtered or unexported fields }
AsyncGofer implements the gofer.Gofer interface. It works just like Graph but allows to update prices asynchronously.
func NewAsyncGofer ¶
func NewAsyncGofer(ctx context.Context, g map[gofer.Pair]nodes.Aggregator, f *feeder.Feeder) (*AsyncGofer, error)
NewAsyncGofer returns a new AsyncGofer instance.
func (*AsyncGofer) Start ¶
func (a *AsyncGofer) Start() error
Start starts asynchronous price updater.
func (*AsyncGofer) Wait ¶
func (a *AsyncGofer) Wait() chan error
Wait waits until the context is canceled or until an error occurs.
type ErrPairNotFound ¶
func (ErrPairNotFound) Error ¶
func (e ErrPairNotFound) Error() string
type Gofer ¶
type Gofer struct {
// contains filtered or unexported fields
}
Gofer implements the gofer.Gofer interface. It uses a graph structure to calculate pairs prices.
func NewGofer ¶
NewGofer returns a new Gofer instance. If the Feeder is not nil, then prices are automatically updated when the Price or Prices methods are called. Otherwise prices have to be updated externally.
Click to show internal directories.
Click to hide internal directories.