config

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockConfig

type BlockConfig struct {
	BlockChainName string         `json:"BlockChainName"`
	BlockMin       int64          `json:"BlockMin"`
	BlockChainCode int64          `json:"BlockChainCode"`
	BlockMax       int64          `json:"BlockMax"`
	Cluster        []*NodeCluster `json:"Cluster"`
}

type Config

type Config struct {
	AutoCreateBlockTask bool           `json:"AutoCreateBlockTask"`
	LogLevel            int            `json:"LogLevel"`
	BlockConfigs        []*BlockConfig `json:"Chains"`
	TaskKafka           *Kafka         `json:"TaskKafka"`
	Redis               *Redis         `json:"Redis"`
}

func LoadConfig

func LoadConfig(path string) Config

type Kafka

type Kafka struct {
	Host      string `json:"Host"`
	Port      int    `json:"Port"`
	Topic     string `json:"Topic"`
	Partition int    `json:"Partition"`
}

type NodeCluster

type NodeCluster struct {
	NodeHost string `json:"NodeHost"`
	NodeKey  string `json:"NodeKey"`
	Weight   int64  `json:"Weight"`
}

type Redis

type Redis struct {
	Addr string `json:"Addr"`
	Port int64  `json:"Port"`
	DB   int    `json:"DB"`
}

Jump to

Keyboard shortcuts

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