Documentation ¶
Index ¶
- Variables
- func MarketplaceTxHandler(bus Bus) marketplace.Handler
- func MarketplaceTxPublisher(ctx context.Context, log log.Logger, tmbus tmclient.EventsClient, bus Bus) (marketplace.Monitor, error)
- type Bus
- type ClusterDeployment
- type ClusterDeploymentStatus
- type Event
- type LeaseWon
- type ManifestReceived
- type Subscriber
- type TxCloseDeployment
- type TxCloseFulfillment
- type TxCloseLease
- type TxCreateFulfillment
- type TxCreateLease
- type TxCreateOrder
- type TxUpdateDeployment
Constants ¶
This section is empty.
Variables ¶
var ErrNotRunning = errors.New("not running")
Functions ¶
func MarketplaceTxHandler ¶
func MarketplaceTxHandler(bus Bus) marketplace.Handler
func MarketplaceTxPublisher ¶
func MarketplaceTxPublisher(ctx context.Context, log log.Logger, tmbus tmclient.EventsClient, bus Bus) (marketplace.Monitor, error)
Wrap tendermint event bus - publish events from tendermint bus to our bus implementation.
Types ¶
type Bus ¶
type Bus interface { Publish(Event) error Subscribe() (Subscriber, error) Close() Done() <-chan struct{} }
Bus is an async event bus that allows subscriptions to behave as a bus themselves. When an event is published, it is sent to all subscribers asynchronously - a subscriber cannot block other subscribers.
NOTE: this should probably be in util/event or something (not in provider/event)
type ClusterDeployment ¶ added in v0.3.0
type ClusterDeployment struct { LeaseID types.LeaseID Group *types.ManifestGroup Status ClusterDeploymentStatus }
type ClusterDeploymentStatus ¶ added in v0.3.0
type ClusterDeploymentStatus string
const ( ClusterDeploymentPending ClusterDeploymentStatus = "pending" ClusterDeploymentDeployed ClusterDeploymentStatus = "deployed" )
type LeaseWon ¶
type LeaseWon struct { LeaseID types.LeaseID Group *types.DeploymentGroup Price uint64 }
type ManifestReceived ¶
type ManifestReceived struct { LeaseID types.LeaseID Manifest *types.Manifest Deployment *types.Deployment Group *types.DeploymentGroup }
func (ManifestReceived) ManifestGroup ¶ added in v0.0.9
func (ev ManifestReceived) ManifestGroup() *types.ManifestGroup
type Subscriber ¶
type Subscriber interface { Events() <-chan Event Clone() (Subscriber, error) Close() Done() <-chan struct{} }
Subscriber emits events it sees on the channel returned by Events(). A Clone() of a subscriber will emit all events that have not been emitted from the cloned subscriber. This is important so that events are not missed when adding subscribers for sub-components (see `provider/bidengine/{service,order}.go`)
type TxCloseDeployment ¶
type TxCloseDeployment = types.TxCloseDeployment
type TxCloseFulfillment ¶
type TxCloseFulfillment = types.TxCloseFulfillment
type TxCloseLease ¶ added in v0.2.4
type TxCloseLease = types.TxCloseLease
type TxCreateFulfillment ¶
type TxCreateFulfillment = types.TxCreateFulfillment
type TxCreateLease ¶
type TxCreateLease = types.TxCreateLease
type TxCreateOrder ¶
type TxCreateOrder = types.TxCreateOrder
type TxUpdateDeployment ¶ added in v0.3.0
type TxUpdateDeployment = types.TxUpdateDeployment