clustersql

package
v1.7.14 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetClusterSetting

func GetClusterSetting(ctx context.Context, db *sql.DB, name string) (string, error)

GetClusterSetting func

func IsValidClusterSettingName

func IsValidClusterSettingName(name string) error

IsValidClusterSettingName func

func RangeMoveDuration

func RangeMoveDuration(ctx context.Context, db *sql.DB) (time.Duration, error)

RangeMoveDuration calculates the slowest time.Duration that a range would reasonably take to move from one node to another. This duration does not account for IOPs or cluster load. If used as a timeout a multiple of this value should be used.

func SetClusterSetting

func SetClusterSetting(ctx context.Context, db *sql.DB, name, value string) error

SetClusterSetting func

Types

type GarbageCollectionConfig

type GarbageCollectionConfig struct {
	TTLSeconds uint `yaml:"ttlseconds"`
}

GarbageCollectionConfig struct

type Zone

type Zone struct {
	Target string
	Config ZoneConfig
}

Zone struct

func ZoneConfigs

func ZoneConfigs(ctx context.Context, db *sql.DB) ([]Zone, error)

ZoneConfigs func

type ZoneConfig

type ZoneConfig struct {
	RangeMinBytes     uint64                  `yaml:"range_min_bytes"`
	RangeMaxBytes     uint64                  `yaml:"range_max_bytes"`
	Replicas          uint                    `yaml:"num_replicas"`
	GarbageCollection GarbageCollectionConfig `yaml:"gc"`
}

ZoneConfig struct

func (*ZoneConfig) Scan

func (c *ZoneConfig) Scan(value interface{}) error

Scan func

Jump to

Keyboard shortcuts

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