Files
aperture/pricer/pricer.go
Olaoluwa Osuntokun 40df8f8339 proxy+pricer: pass in the entire HTTP requests for GetPrice
In this commit, we modify the `GetPrice` method and interface to accept
the full request instead of _just_ the path. For backwards compat, we
leave the path in place, but also include the full serialized HTTP
request.
2023-06-13 20:43:14 -05:00

17 lines
377 B
Go

package pricer
import (
"context"
"net/http"
)
// Pricer is an interface used to query price data from a price provider.
type Pricer interface {
// GetPrice should return the price in satoshis for the given
// resource path.
GetPrice(ctx context.Context, req *http.Request) (int64, error)
// Close should clean up the Pricer implementation if needed.
Close() error
}