Documentation ¶
Index ¶
- type Keeper
- func (k Keeper) Codec() *codec.Codec
- func (k Keeper) Create(ctx sdk.Context, deployment types.Deployment, groups []types.Group) error
- func (k Keeper) GetDeployment(ctx sdk.Context, id types.DeploymentID) (types.Deployment, bool)
- func (k Keeper) GetGroup(ctx sdk.Context, id types.GroupID) (types.Group, bool)
- func (k Keeper) GetGroups(ctx sdk.Context, id types.DeploymentID) []types.Group
- func (k Keeper) OnCloseGroup(ctx sdk.Context, group types.Group) error
- func (k Keeper) OnDeploymentClosed(ctx sdk.Context, group types.Group)
- func (k Keeper) OnLeaseClosed(ctx sdk.Context, id types.GroupID)
- func (k Keeper) OnLeaseCreated(ctx sdk.Context, id types.GroupID)
- func (k Keeper) OnLeaseInsufficientFunds(ctx sdk.Context, id types.GroupID)
- func (k Keeper) OnOrderCreated(ctx sdk.Context, group types.Group)
- func (k Keeper) UpdateDeployment(ctx sdk.Context, deployment types.Deployment) error
- func (k Keeper) WithDeployments(ctx sdk.Context, fn func(types.Deployment) bool)
- func (k Keeper) WithDeploymentsActive(ctx sdk.Context, fn func(types.Deployment) bool)
- func (k Keeper) WithOpenGroups(ctx sdk.Context, fn func(types.Group) bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Keeper of the deployment store
func (Keeper) Create ¶
Create creates a new deployment with given deployment and group specifications
func (Keeper) GetDeployment ¶
func (k Keeper) GetDeployment(ctx sdk.Context, id types.DeploymentID) (types.Deployment, bool)
GetDeployment returns deployment details with provided DeploymentID
func (Keeper) GetGroups ¶
GetGroups returns all groups of a deployment with given DeploymentID from deployment store
func (Keeper) OnCloseGroup ¶ added in v0.7.5
OnCloseGroup provides shutdown API for a Group
func (Keeper) OnDeploymentClosed ¶
OnDeploymentClosed updates group state to group closed
func (Keeper) OnLeaseClosed ¶
OnLeaseClosed updates group state to group opened
func (Keeper) OnLeaseCreated ¶
OnLeaseCreated updates group state to group matched
func (Keeper) OnLeaseInsufficientFunds ¶
OnLeaseInsufficientFunds updates group state to group insufficient funds
func (Keeper) OnOrderCreated ¶
OnOrderCreated updates group state to group ordered
func (Keeper) UpdateDeployment ¶
UpdateDeployment updates deployment details
func (Keeper) WithDeployments ¶
WithDeployments iterates all deployments in deployment store
func (Keeper) WithDeploymentsActive ¶ added in v0.7.5
WithDeploymentsActive filters to only those with State: Active