store

package
v0.0.0-...-83c1a15 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultMysqlConfig

func DefaultMysqlConfig() *mysql.MysqlStoreConfig

Types

type AddressConfig

type AddressConfig struct {
	Address string   `json:"address,omitempty"`
	Url     *url.URL `json:"-"`
}

func (*AddressConfig) GetAddress

func (c *AddressConfig) GetAddress() string

func (*AddressConfig) GetProtocol

func (c *AddressConfig) GetProtocol() string

func (*AddressConfig) GetUrlMap

func (c *AddressConfig) GetUrlMap() url.Values

func (*AddressConfig) PostProcess

func (a *AddressConfig) PostProcess() error

func (*AddressConfig) Sanitize

func (a *AddressConfig) Sanitize()

func (*AddressConfig) ToURL

func (c *AddressConfig) ToURL() (*common.URL, error)

func (*AddressConfig) Validate

func (a *AddressConfig) Validate() error

type CacheStoreConfig

type CacheStoreConfig struct {
	config.BaseConfig

	Enabled        bool                  `json:"enabled" envconfig:"dubbo_store_cache_enabled"`
	ExpirationTime config_types.Duration `json:"expirationTime" envconfig:"dubbo_store_cache_expiration_time"`
}

func DefaultCacheStoreConfig

func DefaultCacheStoreConfig() CacheStoreConfig

type Registry

type Registry struct {
	ConfigCenter   string        `json:"config_center,omitempty"`
	MetadataReport AddressConfig `json:"metadata_report,omitempty"`
	Registry       AddressConfig `json:"registry,omitempty"`
}

func DefaultTraditionalConfig

func DefaultTraditionalConfig() Registry

func (*Registry) PostProcess

func (r *Registry) PostProcess() error

func (*Registry) Sanitize

func (r *Registry) Sanitize()

func (*Registry) Validate

func (r *Registry) Validate() error

type StoreConfig

type StoreConfig struct {
	// Type of Store used in the Control Plane. Can be either "kubernetes", "postgres" or "memory"
	Type StoreType `json:"type" envconfig:"dubbo_store_type"`
	// Kubernetes Store configuration
	Kubernetes *k8s.KubernetesStoreConfig `json:"kubernetes"`
	// Zookeeper Store configuration
	Zookeeper *zookeeper.ZookeeperStoreConfig `json:"zookeeper"`
	// Mysql Store configuration
	Mysql       *mysql.MysqlStoreConfig `json:"mysql"`
	Traditional Registry                `json:"traditional"`
	// Cache configuration
	Cache CacheStoreConfig `json:"cache"`
	// Upsert configuration
	Upsert UpsertConfig `json:"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 `json:"unsafeDelete" envconfig:"dubbo_store_unsafe_delete"`
}

StoreConfig defines Resource Store configuration

func DefaultStoreConfig

func DefaultStoreConfig() *StoreConfig

func (*StoreConfig) PostProcess

func (s *StoreConfig) PostProcess() error

func (*StoreConfig) Sanitize

func (s *StoreConfig) Sanitize()

func (*StoreConfig) Validate

func (s *StoreConfig) Validate() error

type StoreType

type StoreType = string
const (
	KubernetesStore StoreType = "kubernetes"
	MemoryStore     StoreType = "memory"
	MyStore         StoreType = "mysql"
	Traditional     StoreType = "traditional"
)

type UpsertConfig

type UpsertConfig struct {
	config.BaseConfig

	// Base time for exponential backoff on upsert (get and update) operations when retry is enabled
	ConflictRetryBaseBackoff config_types.Duration `json:"conflictRetryBaseBackoff" envconfig:"dubbo_store_upsert_conflict_retry_base_backoff"`
	// Max retries on upsert (get and update) operation when retry is enabled
	ConflictRetryMaxTimes uint `json:"conflictRetryMaxTimes" envconfig:"dubbo_store_upsert_conflict_retry_max_times"`
	// Percentage of jitter. For example: if backoff is 20s, and this value 10, the backoff will be between 18s and 22s.
	ConflictRetryJitterPercent uint `json:"conflictRetryJitterPercent" envconfig:"dubbo_store_upsert_conflict_retry_jitter_percent"`
}

func DefaultUpsertConfig

func DefaultUpsertConfig() UpsertConfig

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