keeper

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2020 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultParamspace = types.ModuleName
)

Default parameter namespace

Variables

M is global metric variable.

Functions

func NewQuerier

func NewQuerier(k Keeper) sdk.Querier

NewQuerier creates a new querier for execution clients.

Types

type Keeper

type Keeper struct {
	// contains filtered or unexported fields
}

Keeper of the execution store

func NewKeeper

func NewKeeper(cdc *codec.Codec, key sdk.StoreKey, bankKeeper types.BankKeeper, serviceKeeper types.ServiceKeeper, instanceKeeper types.InstanceKeeper, runnerKeeper types.RunnerKeeper, processKeeper types.ProcessKeeper, paramstore params.Subspace) Keeper

NewKeeper creates a execution keeper

func (*Keeper) Create

Create creates a new execution from definition.

func (*Keeper) Get

func (k *Keeper) Get(ctx sdk.Context, hash hash.Hash) (*executionpb.Execution, error)

Get returns the execution that matches given hash.

func (Keeper) GetParams

func (k Keeper) GetParams(ctx sdk.Context) types.Params

GetParams returns all the params of the module

func (*Keeper) List

func (k *Keeper) List(ctx sdk.Context) ([]*executionpb.Execution, error)

List returns all executions.

func (Keeper) Logger

func (k Keeper) Logger(ctx sdk.Context) log.Logger

Logger returns a module-specific logger.

func (Keeper) MinPrice

func (k Keeper) MinPrice(ctx sdk.Context) string

MinPrice - Minimum price of an execution

func (Keeper) SetParams

func (k Keeper) SetParams(ctx sdk.Context, params types.Params)

SetParams will populate all the params

func (*Keeper) Update

Update updates a new execution from definition.

type Metric

type Metric struct {
	Created    metrics.Counter
	InProgress metrics.Counter
	Updated    metrics.Counter
	Completed  metrics.Counter
}

Metric is struct to keep counters for execution statuses.

func NewMetric

func NewMetric() *Metric

NewMetric creates a counters metric.

Jump to

Keyboard shortcuts

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