config

package
v0.0.0-...-d88ec87 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConsistencyLevel

type ConsistencyLevel string

ConsistencyLevel specifies how hard should akubra try to ensure consistency inside a region

const (
	//None says that the request shouldn't be logged at all
	None ConsistencyLevel = "None"
	//Weak says that the request should be logged, but if an error occurs on logging, then the request may continue
	Weak ConsistencyLevel = "Weak"
	//Strong says that the request must be logged and can't proceed without an entry in the log
	Strong ConsistencyLevel = "Strong"
)

type Policies

type Policies struct {
	// Multi cluster config
	Shards []Policy `yaml:"Shards"`
	// Domains used for region matching
	Domains []string `yaml:"Domains"`
	// Default region will be applied if Host header would not match any other region
	Default bool `yaml:"Default"`
	// ConsistencyLevel determines how hard akubra will try to  make sure that the object is replicated on all storages
	ConsistencyLevel ConsistencyLevel `yaml:"ConsistencyLevel"`
	// ReadRepair tells akubra that it should emit sync entries when it detects inconsistencies between storage when reading data
	ReadRepair bool `yaml:"ReadRepair"`
}

Policies region configuration

type Policy

type Policy struct {
	ShardName string  `yaml:"ShardName"`
	Weight    float64 `yaml:"Weight"`
}

Policy defines region cluster

type ShardingPolicies

type ShardingPolicies map[string]Policies

ShardingPolicies maps name with Region definition

Jump to

Keyboard shortcuts

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