package
Version:
v0.0.0-...-1fe5a57
Opens a new window with list of versions in this module.
Published: Feb 12, 2021
License: MIT
Opens a new window with license information.
Imports: 10
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
revshare
OpenFaaS function returns the payment pointer to send SPSP queries to based on the current balance of an OpenFaaS Cloud hosted function.
It takes function's name (i.e. myFunction [required]) from a query and is invoked by GET request to
http://gateway-url:8080/function/revshare?function=myFunction
- queries balance function for the function's current balance
- queries the gateway for the total number of function invocations
- returns a string response of the SPSP endpoint to proxy the SPSP query to
Environment Variables
All environment variables are required.
| Environment Variable |
Description |
gateway_url |
Cluster-internal URL of the OpenFaaS gateway service. |
Documentation
¶
type FunctionBalance struct {
Balance uint64 `json:"balance,string"`
Invocations uint64 `json:"remainingInvocations,string"`
}
TODO: import me
Source Files
¶
Click to show internal directories.
Click to hide internal directories.