Documentation ¶
Index ¶
Constants ¶
View Source
const CONTROL_LOOP_INTERVAL = 10 * time.Second
the background "even if we have not heard of an event" loop i.e. things will not wait 10 seconds - the control loop reacts to events in the system - this 10 second background loop is just for in case we miss any events
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ResourceProvider ¶
type ResourceProvider struct {
// contains filtered or unexported fields
}
func NewResourceProvider ¶
func NewResourceProvider( options ResourceProviderOptions, web3SDK *web3.Web3SDK, executor executor.Executor, ) (*ResourceProvider, error)
func (*ResourceProvider) Start ¶
func (resourceProvider *ResourceProvider) Start(ctx context.Context, cm *system.CleanupManager) chan error
type ResourceProviderController ¶
type ResourceProviderController struct {
// contains filtered or unexported fields
}
func NewResourceProviderController ¶
func NewResourceProviderController( options ResourceProviderOptions, web3SDK *web3.Web3SDK, executor executor.Executor, ) (*ResourceProviderController, error)
func (*ResourceProviderController) Start ¶
func (controller *ResourceProviderController) Start(ctx context.Context, cm *system.CleanupManager) chan error
type ResourceProviderOfferOptions ¶
type ResourceProviderOfferOptions struct { // if we are configuring a single machine then // these values are populated by the flags OfferSpec data.MachineSpec // we can dupliate the single spec to create a list of specs OfferCount int // this represents how many machines we will keep // offering to the network // we can configure this with a config file // to start with we will just add --cpu --gpu and --ram flags // to the resource provider CLI which constrains them to a single machine Specs []data.MachineSpec // the list of modules we are willing to run // an empty list means anything Modules []string // this will normally be FixedPrice for RP's Mode data.PricingMode // the default pricing for this resource provider // for all modules that don't have a specific price DefaultPricing data.DealPricing DefaultTimeouts data.DealTimeouts // allow different pricing for different modules ModulePricing map[string]data.DealPricing ModuleTimeouts map[string]data.DealTimeouts // which mediators and directories this RP will trust Services data.ServiceConfig }
this configures the resource offers we will keep track of
type ResourceProviderOptions ¶
type ResourceProviderOptions struct { Bacalhau bacalhau.BacalhauExecutorOptions Offers ResourceProviderOfferOptions Web3 web3.Web3Options }
Click to show internal directories.
Click to hide internal directories.