bufferedbatch

package
v0.2.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2018 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Batch

type Batch struct {
	Links []*cs.Link
	// contains filtered or unexported fields
}

Batch can be used as a base class for types that want to implement github.com/stratumn/sdk/store.Batch. All operations are stored in arrays and can be replayed. Only the Write method must be implemented.

func NewBatch

func NewBatch(a store.Adapter) *Batch

NewBatch creates a new Batch.

func (b *Batch) CreateLink(link *cs.Link) (*types.Bytes32, error)

CreateLink implements github.com/stratumn/sdk/store.LinkWriter.CreateLink.

func (*Batch) FindSegments

func (b *Batch) FindSegments(filter *store.SegmentFilter) (cs.SegmentSlice, error)

FindSegments returns the union of segments in the store and not committed yet.

func (*Batch) GetMapIDs

func (b *Batch) GetMapIDs(filter *store.MapFilter) ([]string, error)

GetMapIDs returns the union of mapIds in the store and not committed yet.

func (*Batch) GetSegment

func (b *Batch) GetSegment(linkHash *types.Bytes32) (segment *cs.Segment, err error)

GetSegment returns a segment from the cache or delegates the call to the store.

func (*Batch) Write

func (b *Batch) Write() (err error)

Write implements github.com/stratumn/sdk/store.Batch.Write.

Jump to

Keyboard shortcuts

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