store

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CacheStoreConfig

type CacheStoreConfig struct {
	Enabled        bool          `yaml:"enabled" envconfig:"kuma_store_cache_enabled"`
	ExpirationTime time.Duration `yaml:"expirationTime" envconfig:"kuma_store_cache_expiration_time"`
}

func DefaultCacheStoreConfig

func DefaultCacheStoreConfig() CacheStoreConfig

func (CacheStoreConfig) Sanitize

func (c CacheStoreConfig) Sanitize()

func (CacheStoreConfig) Validate

func (c CacheStoreConfig) Validate() error

type StoreConfig

type StoreConfig struct {
	// Type of Store used in the Control Plane. Can be either "kubernetes", "postgres" or "memory"
	Type StoreType `yaml:"type" envconfig:"kuma_store_type"`
	// Postgres Store configuration
	Postgres *postgres.PostgresStoreConfig `yaml:"postgres"`
	// Kubernetes Store configuration
	Kubernetes *k8s.KubernetesStoreConfig `yaml:"kubernetes"`
	// Cache configuration
	Cache CacheStoreConfig `yaml:"cache"`
	// Upsert configuration
	Upsert UpsertConfig `yaml:"upsert"`
	// UnsafeDelete skips validation of resource delete.
	// For example you don't have to delete all Dataplane objects before you delete a Mesh
	UnsafeDelete bool `yaml:"unsafeDelete" envconfig:"kuma_store_unsafe_delete"`
}

Resource Store configuration

func DefaultStoreConfig

func DefaultStoreConfig() *StoreConfig

func (*StoreConfig) Sanitize

func (s *StoreConfig) Sanitize()

func (*StoreConfig) Validate

func (s *StoreConfig) Validate() error

type StoreType

type StoreType = string
const (
	KubernetesStore StoreType = "kubernetes"
	PostgresStore   StoreType = "postgres"
	MemoryStore     StoreType = "memory"
)

type UpsertConfig

type UpsertConfig struct {
	// Base time for exponential backoff on upsert (get and update) operations when retry is enabled
	ConflictRetryBaseBackoff time.Duration `yaml:"conflictRetryBaseBackoff" envconfig:"kuma_store_upsert_conflict_retry_base_backoff"`
	// Max retries on upsert (get and update) operation when retry is enabled
	ConflictRetryMaxTimes uint `yaml:"conflictRetryMaxTimes" envconfig:"kuma_store_upsert_conflict_retry_max_times"`
}

func DefaultUpsertConfig

func DefaultUpsertConfig() UpsertConfig

func (*UpsertConfig) Sanitize

func (u *UpsertConfig) Sanitize()

func (*UpsertConfig) Validate

func (u *UpsertConfig) Validate() error

Jump to

Keyboard shortcuts

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