Documentation ¶
Index ¶
- Constants
- func NewBackend(c map[string]string, logger log.Logger) (physical.Backend, error)
- type Backend
- func (b *Backend) Delete(ctx context.Context, key string) error
- func (b *Backend) Get(ctx context.Context, key string) (*physical.Entry, error)
- func (b *Backend) HAEnabled() bool
- func (b *Backend) List(ctx context.Context, prefix string) ([]string, error)
- func (b *Backend) LockWith(key, value string) (physical.Lock, error)
- func (b *Backend) Put(ctx context.Context, entry *physical.Entry) error
- func (b *Backend) Transaction(ctx context.Context, txns []*physical.TxnEntry) error
- type Lock
- type LockRecord
Constants ¶
View Source
const ( // LockRenewInterval is the time to wait between lock renewals. LockRenewInterval = 5 * time.Second // LockRetryInterval is the amount of time to wait if the lock fails before // trying again. LockRetryInterval = 5 * time.Second // LockTTL is the default lock TTL. LockTTL = 15 * time.Second // LockWatchRetryInterval is the amount of time to wait if a watch fails // before trying again. LockWatchRetryInterval = 5 * time.Second // LockWatchRetryMax is the number of times to retry a failed watch before // signaling that leadership is lost. LockWatchRetryMax = 5 )
Variables ¶
This section is empty.
Functions ¶
func NewBackend ¶
NewBackend creates a new Google Spanner storage backend with the given configuration. This uses the official Golang Cloud SDK and therefore supports specifying credentials via envvars, credential files, etc.
Types ¶
type Backend ¶
type Backend struct {
// contains filtered or unexported fields
}
Backend implements physical.Backend and describes the steps necessary to persist data using Google Cloud Spanner.
func (*Backend) HAEnabled ¶
HAEnabled implements HABackend and indicates that this backend supports high availability.
Click to show internal directories.
Click to hide internal directories.