handler

package
v0.7.9-rc18 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 20, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoBids = errors.New("no bids to pick winner from")

Functions

func NewHandler

func NewHandler(keepers Keepers) sdk.Handler

NewHandler returns a handler for "market" type messages

func OnEndBlock

func OnEndBlock(ctx sdk.Context, keepers Keepers) error

OnEndBlock transfer funds for active leases and update order states Executed at the end of block

func PickBidWinner added in v0.9.1

func PickBidWinner(bids []types.Bid) (winner *types.Bid, err error)

Types

type DeploymentKeeper

type DeploymentKeeper interface {
	GetGroup(ctx sdk.Context, id dtypes.GroupID) (dtypes.Group, bool)
	OnLeaseCreated(ctx sdk.Context, id dtypes.GroupID)
	OnLeaseInsufficientFunds(ctx sdk.Context, id dtypes.GroupID)
	OnLeaseClosed(ctx sdk.Context, id dtypes.GroupID)
}

DeploymentKeeper Interface includes deployment methods

type Keepers

type Keepers struct {
	Market     keeper.Keeper
	Deployment DeploymentKeeper
	Provider   ProviderKeeper
	Bank       bankkeeper.Keeper
}

Keepers include all modules keepers

type ProviderKeeper

type ProviderKeeper interface {
	Get(ctx sdk.Context, id sdk.Address) (ptypes.Provider, bool)
	WithProviders(ctx sdk.Context, fn func(ptypes.Provider) bool)
}

ProviderKeeper Interface includes provider methods

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL