config

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 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"`     //结果数据Kafka
	TaskKafka   *Kafka       `json:"TaskKafka"` //任务kafka
	BlockTask   *BlockTask   `json:"BlockTask"`
	TxTask      *TxTask      `json:"TxTask"`
	ReceiptTask *ReceiptTask `json:"ReceiptTask"`
	Redis       *Redis       `json:"Redis"`
}

func (*Chain) CopyChain

func (c *Chain) CopyChain() Chain

type Config

type Config struct {
	Chains    []*Chain   `json:"Chains"`
	LogConfig *LogConfig `json:"Log"`
	KeyPath   string     `json:"KeyPath"`
}

func LoadConfig

func LoadConfig(path string) Config

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"`
	Partitions  []int64 `json:"WritePartitions"`
	Group       string  `json:"Group"`
	StartOffset int64   `json:"StartOffset"`
}

func (*Kafka) CopyKafka

func (k *Kafka) CopyKafka() Kafka

type LogConfig

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

type ReceiptTask

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

func (*ReceiptTask) CopyReceiptTask

func (b *ReceiptTask) CopyReceiptTask() ReceiptTask

type Redis

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

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