compat

package
v2.0.0-beta.5 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

package compat helps with migrating toml files from influxdb.

Platform has a different config layout that doesn't match the layout in the old toml files. Since we may want the ability to load those old files and still have them apply their relevant settings, this package allows one to convert from an old config struct to a new one.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Convert

func Convert(oldConfig Config) (string, storage.Config)

Convert takes an old Config and converts it into a new Config. It also returns the value of the Dir key so that it can be passed through appropriately to the storage engine constructor.

Types

type Config

type Config struct {
	Dir                            string        `toml:"dir"`
	WALDir                         string        `toml:"wal-dir"`
	WALFsyncDelay                  toml.Duration `toml:"wal-fsync-delay"`
	CacheMaxMemorySize             toml.Size     `toml:"cache-max-memory-size"`
	CacheSnapshotMemorySize        toml.Size     `toml:"cache-snapshot-memory-size"`
	CacheSnapshotWriteColdDuration toml.Duration `toml:"cache-snapshot-write-cold-duration"`
	CompactFullWriteColdDuration   toml.Duration `toml:"compact-full-write-cold-duration"`
	CompactThroughput              toml.Size     `toml:"compact-throughput"`
	CompactThroughputBurst         toml.Size     `toml:"compact-throughput-burst"`
	MaxConcurrentCompactions       int           `toml:"max-concurrent-compactions"`
	TSMWillNeed                    bool          `toml:"tsm-use-madv-willneed"`
}

Config matches the old toml layout from the influxdb repo, so that we can read in those files and convert them to the new config layout.

func NewConfig

func NewConfig() Config

NewConfig constructs an old Config struct with appropriate defaults for a new Config.

Jump to

Keyboard shortcuts

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