common

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TimerVersion added in v0.10.0

func TimerVersion() uint64

Types

type FixationStore

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

func NewFixationStore

func NewFixationStore(storeKey sdk.StoreKey, cdc codec.BinaryCodec, prefix string) *FixationStore

NewFixationStore returns a new FixationStore object

func (*FixationStore) AdvanceBlock added in v0.10.0

func (fs *FixationStore) AdvanceBlock(ctx sdk.Context)

func (*FixationStore) AppendEntry

func (fs *FixationStore) AppendEntry(
	ctx sdk.Context,
	index string,
	block uint64,
	entryData codec.ProtoMarshaler,
) error

AppendEntry adds a new entry to the store

func (*FixationStore) FindEntry

func (fs *FixationStore) FindEntry(ctx sdk.Context, index string, block uint64, entryData codec.ProtoMarshaler) bool

FindEntry returns the entry by index and block without changing the refcount

func (FixationStore) GetAllEntryIndices

func (fs FixationStore) GetAllEntryIndices(ctx sdk.Context) []string

GetAllEntryIndices returns all Entry indices

func (FixationStore) GetAllEntryIndicesWithPrefix added in v0.10.0

func (fs FixationStore) GetAllEntryIndicesWithPrefix(ctx sdk.Context, prefix string) []string

GetAllEntryIndexWithPrefix returns all Entry indices with a given prefix

func (*FixationStore) GetAllEntryVersions added in v0.10.0

func (fs *FixationStore) GetAllEntryVersions(ctx sdk.Context, index string, stale bool) (blocks []uint64)

GetAllEntryVersions returns a list of all versions (blocks) of an entry. If stale == true, then the output will include stale versions (for testing).

func (*FixationStore) GetEntry

func (fs *FixationStore) GetEntry(ctx sdk.Context, index string, entryData codec.ProtoMarshaler) bool

GetEntry returns the latest entry by index and increments the refcount

func (*FixationStore) MigrateVersion added in v0.10.0

func (fs *FixationStore) MigrateVersion(ctx sdk.Context) (err error)

func (*FixationStore) ModifyEntry

func (fs *FixationStore) ModifyEntry(ctx sdk.Context, index string, block uint64, entryData codec.ProtoMarshaler) error

ModifyEntry modifies an existing entry in the store

func (*FixationStore) PutEntry

func (fs *FixationStore) PutEntry(ctx sdk.Context, index string, block uint64)

PutEntry finds the entry by index and block and decrements the refcount

type TimerCallback added in v0.10.0

type TimerCallback func(ctx sdk.Context, data string)

type TimerStore added in v0.10.0

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

func NewTimerStore added in v0.10.0

func NewTimerStore(storeKey sdk.StoreKey, cdc codec.BinaryCodec, prefix string) *TimerStore

NewTimerStore returns a new TimerStore object

func (*TimerStore) AddTimerByBlockHeight added in v0.10.0

func (tstore *TimerStore) AddTimerByBlockHeight(ctx sdk.Context, block uint64, data string)

func (*TimerStore) AddTimerByBlockTime added in v0.10.0

func (tstore *TimerStore) AddTimerByBlockTime(ctx sdk.Context, timestamp uint64, data string)

func (*TimerStore) GetNextTimeoutBlockHeight added in v0.10.0

func (tstore *TimerStore) GetNextTimeoutBlockHeight(ctx sdk.Context) uint64

func (*TimerStore) GetNextTimeoutBlockTime added in v0.10.0

func (tstore *TimerStore) GetNextTimeoutBlockTime(ctx sdk.Context) uint64

func (*TimerStore) MigrateVersion added in v0.10.0

func (tstore *TimerStore) MigrateVersion(ctx sdk.Context) (err error)

func (*TimerStore) Tick added in v0.10.0

func (tstore *TimerStore) Tick(ctx sdk.Context)

func (*TimerStore) WithCallbackByBlockHeight added in v0.10.0

func (tstore *TimerStore) WithCallbackByBlockHeight(callback func(ctx sdk.Context, data string)) *TimerStore

func (*TimerStore) WithCallbackByBlockTime added in v0.10.0

func (tstore *TimerStore) WithCallbackByBlockTime(callback func(ctx sdk.Context, data string)) *TimerStore

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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