keeper

package
v1.0.0-alpha Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildFeedContext

func BuildFeedContext(ctx sdk.Context, k Keeper, feed types.Feed) (feedCtx types.FeedContext)

func NewQuerier

func NewQuerier(k Keeper, legacyQuerierCdc codec.JSONMarshaler) sdk.Querier

NewQuerier creates a querier for the oracle module

Types

type Keeper

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

Keeper

func NewKeeper

func NewKeeper(
	cdc codec.Marshaler,
	storeKey sdk.StoreKey,
	paramSpace paramtypes.Subspace,
	gk types.GuardianKeeper,
	sk types.ServiceKeeper,
) Keeper

NewKeeper

func (Keeper) CreateFeed

func (k Keeper) CreateFeed(ctx sdk.Context, msg *types.MsgCreateFeed) error

CreateFeed create a stopped feed

func (Keeper) Dequeue

func (k Keeper) Dequeue(ctx sdk.Context, feedName string, state servicetypes.RequestContextState)

Dequeue will remove from the 'state' queue

func (Keeper) EditFeed

func (k Keeper) EditFeed(ctx sdk.Context, msg *types.MsgEditFeed) error

EditFeed edit a feed

func (Keeper) Enqueue

func (k Keeper) Enqueue(ctx sdk.Context, feedName string, state servicetypes.RequestContextState)

Enqueue will put feedName to a 'state' queue

func (Keeper) Feed

Feed queries a feed by feed name

func (Keeper) Feeds

func (Keeper) GetFeed

func (k Keeper) GetFeed(ctx sdk.Context, feedName string) (feed types.Feed, found bool)

GetFeed return the feed by feedName

func (Keeper) GetFeedByReqCtxID

func (k Keeper) GetFeedByReqCtxID(ctx sdk.Context, requestContextID tmbytes.HexBytes) (feed types.Feed, found bool)

GetFeedByReqCtxID return feed by requestContextID

func (Keeper) GetFeedValues

func (k Keeper) GetFeedValues(ctx sdk.Context, feedName string) (result types.FeedValues)

GetFeedValues return all feed values by feedName

func (Keeper) GetRequestContext

func (k Keeper) GetRequestContext(ctx sdk.Context, requestContextID tmbytes.HexBytes) (servicetypes.RequestContext, bool)

func (Keeper) HandlerResponse

func (k Keeper) HandlerResponse(ctx sdk.Context,
	requestContextID tmbytes.HexBytes,
	responseOutput []string,
	err error)

HandlerResponse is responsible for processing the data returned from the servicetypes module, processed by the aggregate function, and then saved

func (Keeper) HandlerStateChanged

func (k Keeper) HandlerStateChanged(ctx sdk.Context, requestContextID tmbytes.HexBytes, _ string)

HandlerStateChanged is responsible for update feed state

func (Keeper) IteratorFeeds

func (k Keeper) IteratorFeeds(ctx sdk.Context, fn func(feed types.Feed))

IteratorFeeds will foreach all feeds

func (Keeper) IteratorFeedsByState

func (k Keeper) IteratorFeedsByState(
	ctx sdk.Context,
	state servicetypes.RequestContextState,
	fn func(feed types.Feed),
)

IteratorFeedsByState will foreach all feeds by state

func (Keeper) PauseFeed

func (k Keeper) PauseFeed(ctx sdk.Context, msg *types.MsgPauseFeed) error

PauseFeed pause a running feed

func (Keeper) ResetFeedEntryState

func (k Keeper) ResetFeedEntryState(ctx sdk.Context) error

func (Keeper) SetFeed

func (k Keeper) SetFeed(ctx sdk.Context, feed types.Feed)

SetFeed will save a feed to store

func (Keeper) SetFeedValue

func (k Keeper) SetFeedValue(
	ctx sdk.Context,
	feedName string,
	batchCounter uint64,
	latestHistory uint64,
	value types.FeedValue,
)

SetFeedValue will save a feed result to store

func (Keeper) StartFeed

func (k Keeper) StartFeed(ctx sdk.Context, msg *types.MsgStartFeed) error

StartFeed start a stopped feed

Jump to

Keyboard shortcuts

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