cindex

package
v0.1.3 Latest Latest
Warning

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

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

Documentation

Overview

Package cindex provides an interface and implementation for getting/saving consistentIndex.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConsistentIndexer

type ConsistentIndexer interface {

	// ConsistentIndex returns the consistent index of current executing entry.
	ConsistentIndex() uint64

	// SetConsistentIndex set the consistent index of current executing entry.
	SetConsistentIndex(v uint64)

	// UnsafeSave must be called holding the lock on the tx.
	// It saves consistentIndex to the underlying stable storage.
	UnsafeSave(tx backend.BatchTx)

	// SetBatchTx set the available backend.BatchTx for ConsistentIndexer.
	SetBatchTx(tx backend.BatchTx)
}

ConsistentIndexer is an interface that wraps the Get/Set/Save method for consistentIndex.

func NewConsistentIndex

func NewConsistentIndex(tx backend.BatchTx) ConsistentIndexer

func NewFakeConsistentIndex

func NewFakeConsistentIndex(index uint64) ConsistentIndexer

Jump to

Keyboard shortcuts

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