splitop

package
v2.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package splitop provides a avoid Datastore's limitation.

https://cloud.google.com/datastore/docs/concepts/limits

DO

* split GetMulti operation to under 1000 entity per one action.

  • > Maximum number of keys allowed for a Lookup operation in the Cloud Datastore API : 1,000

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(opts ...Option) datastore.Middleware

New split call middleware will be returns.

Types

type Option

type Option interface {
	Apply(*splitHandler)
}

A Option is an option for splitop.

func WithGetSplitThreshold

func WithGetSplitThreshold(threshold int) Option

WithGetSplitThreshold set get operation split threshold.

func WithLogger

func WithLogger(logf func(ctx context.Context, format string, args ...interface{})) Option

WithLogger creates a Option that uses the specified logger.

func WithPutSplitThreshold

func WithPutSplitThreshold(threshold int) Option

WithPutSplitThreshold set put operation split threshold.

func WithSplitThreshold

func WithSplitThreshold(threshold int) Option

WithSplitThreshold set operation split threshold. Deprecated: use WithGetSplitThreshold instead.

Jump to

Keyboard shortcuts

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