spanner

package
v1.19.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	Engine = "spanner"
)

Variables

This section is empty.

Functions

func ContextualizedCaveatFrom added in v1.14.0

func ContextualizedCaveatFrom(name spanner.NullString, context spanner.NullJSON) (*core.ContextualizedCaveat, error)

func NewSpannerDatastore

func NewSpannerDatastore(database string, opts ...Option) (datastore.Datastore, error)

NewSpannerDatastore returns a datastore backed by cloud spanner

Types

type Option

type Option func(*spannerOptions)

Option provides the facility to configure how clients within the Spanner datastore interact with the running Spanner database.

func CredentialsFile

func CredentialsFile(path string) Option

CredentialsFile is the path to a file containing credentials for a service account that can access the cloud spanner instance

func DisableStats added in v1.18.0

func DisableStats(disable bool) Option

DisableStats disables recording counts to the stats table

func EmulatorHost added in v1.8.0

func EmulatorHost(uri string) Option

EmulatorHost is the URI of a Spanner emulator to connect to for development and testing use

func FollowerReadDelay

func FollowerReadDelay(delay time.Duration) Option

FollowerReadDelay is the time delay to apply to enable historial reads.

This value defaults to 0 seconds.

func GCEnabled added in v1.13.0

func GCEnabled(isGCEnabled bool) Option

GCEnabled indicates whether garbage collection is enabled.

GC is enabled by default.

func GCInterval

func GCInterval(interval time.Duration) Option

GCInterval is the the interval at which garbage collection will occur.

This value defaults to 3 minutes.

func GCWindow

func GCWindow(window time.Duration) Option

GCWindow is the maximum age of a passed revision that will be considered valid.

This value defaults to 1 hour.

func MaxRevisionStalenessPercent

func MaxRevisionStalenessPercent(stalenessPercent float64) Option

MaxRevisionStalenessPercent is the amount of time, expressed as a percentage of the revision quantization window, that a previously computed rounded revision can still be advertised after the next rounded revision would otherwise be ready.

This value defaults to 0.1 (10%).

func RevisionQuantization

func RevisionQuantization(bucketSize time.Duration) Option

RevisionQuantization is the time bucket size to which advertised revisions will be rounded.

This value defaults to 5 seconds.

func WatchBufferLength

func WatchBufferLength(watchBufferLength uint16) Option

WatchBufferLength is the number of entries that can be stored in the watch buffer while awaiting read by the client.

This value defaults to 128.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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