oci

package
v1.14.2 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2023 License: MPL-2.0 Imports: 22 Imported by: 2

Documentation

Overview

Copyright © 2019, Oracle and/or its affiliates.

Copyright © 2019, Oracle and/or its affiliates.

Index

Constants

View Source
const (
	// LockRenewInterval is the time to wait between lock renewals.
	LockRenewInterval = 3 * time.Second

	// LockRetryInterval is the amount of time to wait if the lock fails before trying again.
	LockRetryInterval = 5 * time.Second

	// LockWatchRetryInterval is the amount of time to wait if a watch fails before trying again.
	LockWatchRetryInterval = 2 * time.Second

	// LockTTL is the default lock TTL.
	LockTTL = 15 * time.Second

	// LockWatchRetryMax is the number of times to retry a failed watch before signaling that leadership is lost.
	LockWatchRetryMax = 4

	// LockCacheMinAcceptableAge is minimum cache age in seconds to determine that its safe for a secondary instance
	// to acquire lock.
	LockCacheMinAcceptableAge = 45 * time.Second

	// LockWriteRetriesOnFailures is the number of retries that are made on write 5xx failures.
	LockWriteRetriesOnFailures = 4

	ObjectStorageCallsReadTimeout = 3 * time.Second

	ObjectStorageCallsWriteTimeout = 3 * time.Second
)
View Source
const (
	// Limits maximum outstanding requests
	MaxNumberOfPermits = 256
)

Variables

This section is empty.

Functions

func NewBackend

func NewBackend(conf map[string]string, logger log.Logger) (physical.Backend, error)

Types

type Backend

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

func (*Backend) Delete

func (o *Backend) Delete(ctx context.Context, key string) error

func (*Backend) Get

func (o *Backend) Get(ctx context.Context, key string) (*physical.Entry, error)

func (*Backend) HAEnabled

func (b *Backend) HAEnabled() bool

func (*Backend) List

func (o *Backend) List(ctx context.Context, prefix string) ([]string, error)

func (*Backend) LockWith

func (b *Backend) LockWith(key, value string) (physical.Lock, error)

LockWith acquires a mutual exclusion based on the given Key.

func (*Backend) Put

func (o *Backend) Put(ctx context.Context, entry *physical.Entry) error

type Lock

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

func (*Lock) Lock

func (l *Lock) Lock(stopCh <-chan struct{}) (<-chan struct{}, error)

func (*Lock) Unlock

func (l *Lock) Unlock() error

func (*Lock) Value

func (l *Lock) Value() (bool, string, error)

type LockCache

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

type LockRecord

type LockRecord struct {
	Key      string
	Value    string
	Identity string
}

Jump to

Keyboard shortcuts

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