config

package
v0.2.20 Latest Latest
Warning

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

Go to latest
Published: May 27, 2026 License: MIT Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package config provides configuration-driven adapter bootstrap helpers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildManager

func BuildManager(ctx context.Context, cfg Config) (*exchanges.Manager, error)

BuildManager constructs a manager from the provided parsed configuration.

func LoadManager

func LoadManager(ctx context.Context, path string) (*exchanges.Manager, error)

LoadManager loads a config file and constructs a populated adapter manager.

Types

type Config

type Config struct {
	Exchanges []ExchangeConfig `json:"exchanges" yaml:"exchanges"`
}

Config is the top-level YAML/JSON shape for adapter bootstrap files.

func Load

func Load(path string) (Config, error)

Load reads a YAML or JSON config file from disk and expands environment variables.

type ExchangeConfig

type ExchangeConfig struct {
	Name       string               `json:"name" yaml:"name"`
	Alias      string               `json:"alias,omitempty" yaml:"alias,omitempty"`
	MarketType exchanges.MarketType `json:"market_type" yaml:"market_type"`
	Options    map[string]string    `json:"options,omitempty" yaml:"options,omitempty"`
}

ExchangeConfig describes one adapter instance to construct from config.

Directories

Path Synopsis
Package all blank-imports every registered exchange package for config bootstrap.
Package all blank-imports every registered exchange package for config bootstrap.

Jump to

Keyboard shortcuts

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