Documentation ¶
Index ¶
Constants ¶
View Source
const LoggerTag = "FEEDER"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Feedable ¶
type Feedable interface { // OriginPair returns the origin and pair which are acceptable for // this Node. OriginPair() nodes.OriginPair // Ingest sets the Price for this Node. It may return error if // the OriginPrice contains incompatible origin or pair. Ingest(price nodes.OriginPrice) error // MinTTL is the amount of time during which the Price shouldn't be updated. MinTTL() time.Duration // MaxTTL is the maximum amount of time during which the Price can be used. // After that time, the Price method will return a OriginPrice with // a ErrPriceTTLExpired error. MaxTTL() time.Duration // Expired returns true if the Price is expired. This is based on the MaxTTL // value. Expired() bool // Price returns the Price assigned in the Ingest method. If the Price is // expired then a ErrPriceTTLExpired error will be set in // the OriginPrice.Error field. Price() nodes.OriginPrice }
type Feeder ¶
type Feeder struct {
// contains filtered or unexported fields
}
Feeder sets prices from origins to the Feedable nodes.
func (*Feeder) Feed ¶
Feed sets Prices to Feedable nodes. This method takes list of root nodes and sets Prices to all of their children that implement the Feedable interface.
Click to show internal directories.
Click to hide internal directories.