handler

package
v0.7.8-rc2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

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

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       bank.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