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 Chain

type Chain struct {
	BlockChain    int64                   `json:"BlockChain"`
	TxStore       bool                    `json:"TxStore"`
	BlockStore    bool                    `json:"BlockStore"`
	ReceiptStore  bool                    `json:"ReceiptStore"`
	SubStore      bool                    `json:"SubStore"`
	BackupTxStore bool                    `json:"BackupTxStore"`
	KafkaCfg      map[string]*KafkaConfig `json:"Kafka"`
	ClickhouseDb  *ClickhouseChainDb      `json:"ChainDb"`
	Redis         *Redis                  `json:"Redis"`
}

type ClickhouseBaseDb

type ClickhouseBaseDb struct {
	Addr         string `json:"Addr"`
	Port         int    `json:"Port"`
	User         string `json:"User"`
	Password     string `json:"Password"`
	DbName       string `json:"DbName"`
	AddressTable string `json:"AddressTable"`
	TokenTable   string `json:"TokenTable"`
	FilterTable  string `json:"FilterTable"`
}

type ClickhouseChainDb

type ClickhouseChainDb struct {
	Addr          string `json:"Addr"`
	Port          int    `json:"Port"`
	User          string `json:"User"`
	Password      string `json:"Password"`
	DbName        string `json:"DbName"`
	TxTable       string `json:"TxTable"`
	BlockTable    string `json:"BlockTable"`
	ReceiptTable  string `json:"ReceiptTable"`
	SubTxTable    string `json:"SubTxTable"`
	BackupTxTable string `json:"BackupTxTable"`
}

type Config

type Config struct {
	RootPath string            `json:"RootPath"`
	Port     int               `json:"Port"`
	LogLevel int               `json:"LogLevel"`
	Chains   []*Chain          `json:"Chains"`
	BaseDb   *ClickhouseBaseDb `json:"BaseDb"`
}

func LoadConfig

func LoadConfig(path string) Config

type KafkaConfig

type KafkaConfig struct {
	Port        int    `json:"Port" `
	Host        string `json:"Host"`
	Topic       string `json:"Topic"`
	Partition   int    `json:"Partition"`
	Group       string `json:"Group"`
	StartOffset int64  `json:"StartOffset"` //-1:latest,-2:first,0:commited offset
}

type Redis

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

type Topic

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

Jump to

Keyboard shortcuts

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