mirror of
https://github.com/lightninglabs/aperture.git
synced 2025-12-17 00:54:20 +01:00
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.
17 lines
377 B
Go
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
|
|
}
|