Documentation ¶
Index ¶
- Constants
- func NewSpannerDatastore(database string, opts ...Option) (datastore.Datastore, error)
- type Option
- func CredentialsFile(path string) Option
- func EmulatorHost(uri string) Option
- func FollowerReadDelay(delay time.Duration) Option
- func GCInterval(interval time.Duration) Option
- func GCWindow(window time.Duration) Option
- func MaxRevisionStalenessPercent(stalenessPercent float64) Option
- func RevisionQuantization(bucketSize time.Duration) Option
- func WatchBufferLength(watchBufferLength uint16) Option
Constants ¶
const (
Engine = "spanner"
)
Variables ¶
This section is empty.
Functions ¶
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 ¶
CredentialsFile is the path to a file containing credentials for a service account that can access the cloud spanner instance
func EmulatorHost ¶ added in v1.8.0
EmulatorHost is the URI of a Spanner emulator to connect to for development and testing use
func FollowerReadDelay ¶
FollowerReadDelay is the time delay to apply to enable historial reads.
This value defaults to 0 seconds.
func GCInterval ¶
GCInterval is the the interval at which garbage collection will occur.
This value defaults to 3 minutes.
func GCWindow ¶
GCWindow is the maximum age of a passed revision that will be considered valid.
This value defaults to 1 hour.
func MaxRevisionStalenessPercent ¶
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 ¶
RevisionQuantization is the time bucket size to which advertised revisions will be rounded.
This value defaults to 5 seconds.
func WatchBufferLength ¶
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.