config

package
v0.0.0-...-855f182 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2023 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 BlockTask

type BlockTask struct {
	FromCluster []*FromCluster `json:"FromCluster"`
	Kafka       *Kafka         `json:"Kafka"`
}

func (*BlockTask) CopyBlockTask

func (b *BlockTask) CopyBlockTask() BlockTask

type Chain

type Chain struct {
	Etcd           *Etcd        `json:"Etcd"`
	BlockChainName string       `json:"BlockChainName"`
	BlockChainCode int          `json:"BlockChainCode"`
	NodeWeight     int          `json:"NodeWeight"`
	PullReceipt    bool         `json:"PullReceipt"`
	PullTx         bool         `json:"PullTx"`
	Kafka          *Kafka       `json:"Kafka"`
	BlockTask      *BlockTask   `json:"BlockTask"`
	TxTask         *TxTask      `json:"TxTask"`
	ReceiptTask    *ReceiptTask `json:"ReceiptTask"`
}

func (*Chain) CopyChain

func (c *Chain) CopyChain() Chain

type Config

type Config struct {
	TaskDb     *TaskDb     `json:"NodeTaskDb"`
	SourceDb   *SourceDb   `json:"NodeSourceDb"`
	NodeInfoDb *NodeInfoDb `json:"NodeInfoDb"`
	Chains     []*Chain    `json:"Chains"`
	LogConfig  *LogConfig  `json:"Log"`
}

func LoadConfig

func LoadConfig(path string) Config

type Etcd

type Etcd struct {
	Host string `json:"Host"`
	Key  string `json:"Key"`
	Ttl  int64  `json:"Ttl"`
}

type FromCluster

type FromCluster struct {
	Host       string `json:"Host"`
	Port       int    `json:"Port"`
	Key        string `json:"Key"`
	Weight     int64  `json:"Weight"`
	ErrorCount int64  `json:"ErrorCount"`
}

func (*FromCluster) CopyFromCluster

func (f *FromCluster) CopyFromCluster() FromCluster

type Kafka

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

func (*Kafka) CopyKafka

func (k *Kafka) CopyKafka() Kafka

type LogConfig

type LogConfig struct {
	Path  string `json:"Path"`
	Delay int64  `json:"Delay"`
}

type NodeInfoDb

type NodeInfoDb struct {
	Addr     string `json:"Addr"`
	Port     int    `json:"Port"`
	User     string `json:"User"`
	Password string `json:"Password"`
	DbName   string `json:"DbName"`
	Table    string `json:"Table"`
}

type ReceiptTask

type ReceiptTask struct {
	FromCluster []*FromCluster `json:"FromCluster"`
	Kafka       *Kafka         `json:"Kafka"`
}

func (*ReceiptTask) CopyReceiptTask

func (b *ReceiptTask) CopyReceiptTask() ReceiptTask

type SourceDb

type SourceDb struct {
	Addr     string `json:"Addr"`
	Port     int    `json:"Port"`
	User     string `json:"User"`
	Password string `json:"Password"`
	DbName   string `json:"DbName"`
	Table    string `json:"Table"`
}

type TaskDb

type TaskDb struct {
	Addr     string `json:"Addr"`
	Port     int    `json:"Port"`
	User     string `json:"User"`
	Password string `json:"Password"`
	DbName   string `json:"DbName"`
	Table    string `json:"Table"`
}

type TxTask

type TxTask struct {
	FromCluster []*FromCluster `json:"FromCluster"`
	Kafka       *Kafka         `json:"Kafka"`
}

func (*TxTask) CopyTxTask

func (b *TxTask) CopyTxTask() TxTask

Jump to

Keyboard shortcuts

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