batch

package
v0.3.0 Latest Latest
Warning

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

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

Documentation

Overview

Package batch allows for reading and writing of batches of mutations. Each batch of revisions corresponds to a map revision.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Table

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

Table implements sequencer.Batcher

func New

func New(client *spanner.Client) *Table

New returns a new Table.

func (*Table) HighestRev

func (t *Table) HighestRev(ctx context.Context, directoryID string) (int64, error)

HighestRev returns the highest defined revision number for directoryID.

func (*Table) ReadBatch

func (t *Table) ReadBatch(ctx context.Context, directoryID string, rev int64) (*spb.MapMetadata, error)

ReadBatch returns the batch definitions for a given revision.

func (*Table) WriteBatchSources

func (t *Table) WriteBatchSources(ctx context.Context, dirID string, rev int64, sources *spb.MapMetadata) error

WriteBatchSources saves the the source metadata used to make this revision. It is the caller's responsibility to ensure that rev is sequential.

Jump to

Keyboard shortcuts

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