versions

package
v0.0.0-...-01a2bca Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2026 License: MIT Imports: 34 Imported by: 0

Documentation

Overview

Package versions handles config upgrades and downgrades

  • Versions must be stateful, and not rely upon type definitions in the config pkg

  • Instead versions should localise types into vN/types.go to avoid issues with subsequent changes

  • Versions must upgrade to the next version. Do not retrospectively change versions to match new type changes. Create a new version

  • Versions must implement ExchangeVersion or ConfigVersion, and may implement both

Index

Constants

View Source
const UseLatestVersion = math.MaxUint16

UseLatestVersion used as version param to Deploy to automatically use the latest version

Variables

View Source
var Manager = newManager()

Manager is a public instance of the config version manager

Functions

This section is empty.

Types

type ConfigVersion

type ConfigVersion interface {
	UpgradeConfig(context.Context, []byte) ([]byte, error)
	DowngradeConfig(context.Context, []byte) ([]byte, error)
}

ConfigVersion is a version that affects the general configuration

type ExchangeVersion

type ExchangeVersion interface {
	Exchanges() []string // Use `*` for all exchanges
	UpgradeExchange(context.Context, []byte) ([]byte, error)
	DowngradeExchange(context.Context, []byte) ([]byte, error)
}

ExchangeVersion is a version that affects specific exchange configurations

Directories

Path Synopsis
Package v13 migrates deprecated CoinMarketCap account plan names.
Package v13 migrates deprecated CoinMarketCap account plan names.
Package v14 migrates GateIO's default spot orderbook websocket subscription to V2.
Package v14 migrates GateIO's default spot orderbook websocket subscription to V2.
Package v15 removes deprecated BitMEX exchange configurations.
Package v15 removes deprecated BitMEX exchange configurations.
Package v16 removes configuration for the decommissioned GCTScript feature.
Package v16 removes configuration for the decommissioned GCTScript feature.
Package v17 removes obsolete websocket orderbook buffer settings.
Package v17 removes obsolete websocket orderbook buffer settings.
Package v18 migrates the legacy OKX websocket defaults to TLS port 443.
Package v18 migrates the legacy OKX websocket defaults to TLS port 443.
Package v19 migrates Huobi exchange configurations to HTX and adds derivative defaults.
Package v19 migrates Huobi exchange configurations to HTX and adds derivative defaults.

Jump to

Keyboard shortcuts

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