config

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2019 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GlobalSection    = "global"
	ProfilingSection = "profiling"
	MetricSection    = "metric"
	ListenSection    = "listen"
	DeploySection    = "deploy"
	LocationSection  = "location"
	AuthSection      = "auth"
	APISection       = "api"
	AccountSection   = "account"
	DatabaseSection  = "database"
	ProducerSection  = "producer"
	ConsumerSection  = "consumer"
)
View Source
const (
	BCHSection          = "bch"
	BTCSection          = "btc"
	ETCSection          = "etc"
	ETHSection          = "eth"
	EOSSection          = "eos"
	LTCSection          = "ltc"
	DOGESection         = "doge"
	BSVSection          = "bsv"
	TRONSection         = "tron"
	XRPSection          = "xrp"
	XLMSection          = "xlm"
	KafkaBCHSection     = "kafka.bch"
	KafkaBTCSection     = "kafka.btc"
	KafkaETCSection     = "kafka.etc"
	KafkaETHSection     = "kafka.eth"
	KafkaEOSSection     = "kafka.eos"
	KafkaLTCSection     = "kafka.ltc"
	KafkaDOGESection    = "kafka.doge"
	KafkaBSVSection     = "kafka.bsv"
	KafkaTRONSection    = "kafka.tron"
	KafkaXRPSection     = "kafka.xrp"
	KafkaXLMSection     = "kafka.xlm"
	CronBCHSection      = "cron.bch"
	CronBTCSection      = "cron.btc"
	CronETCSection      = "cron.etc"
	CronETHSection      = "cron.eth"
	CronEOSSection      = "cron.eos"
	CronLTCSection      = "cron.ltc"
	CronDOGESection     = "cron.doge"
	CronBSVSection      = "cron.bsv"
	CronTRONSection     = "cron.tron"
	CronXRPSection      = "cron.xrp"
	CronXLMSection      = "cron.xlm"
	DatabaseBTCSection  = "database.btc"
	DatabaseETHSection  = "database.eth"
	DatabaseBCHSection  = "database.bch"
	DatabaseETCSection  = "database.etc"
	DatabaseLTCSection  = "database.ltc"
	DatabaseEOSSection  = "database.eos"
	DatabaseXRPSection  = "database.xrp"
	DatabaseDOGESection = "database.doge"
	DatabaseBSVSection  = "database.bsv"
	DatabaseTRONSection = "database.tron"
	DatabaseXLMSection  = "database.xlm"
)

Variables

This section is empty.

Functions

func InitSplitterConfig

func InitSplitterConfig(config string) (err error)

Types

type Auth

type Auth struct {
	Enable     bool
	AdminKey   string
	EncryptKey string
}

type BCH

type BCH struct {
	Enable                     bool   `ini:"enable"`
	DatabaseEnable             bool   `ini:"database_enable"`
	MaxBatchBlock              int    `ini:"max_batch_block"`
	Endpoint                   string `ini:"endpoint"`
	User                       string `ini:"user"`
	Password                   string `ini:"password"`
	JSONSchemaFile             string `ini:"json_schema_file"`
	JSONSchemaValidationEnable bool   `ini:"json_schema_validation_enable"`
}

type BSV

type BSV struct {
	Enable                     bool   `ini:"enable"`
	DatabaseEnable             bool   `ini:"database_enable"`
	MaxBatchBlock              int    `ini:"max_batch_block"`
	Endpoint                   string `ini:"endpoint"`
	User                       string `ini:"user"`
	Password                   string `ini:"password"`
	JSONSchemaFile             string `ini:"json_schema_file"`
	JSONSchemaValidationEnable bool   `ini:"json_schema_validation_enable"`
}

type BTC

type BTC struct {
	Enable                     bool   `ini:"enable"`
	DatabaseEnable             bool   `ini:"database_enable"`
	OmniEnable                 bool   `ini:"omni_enable"`
	MaxBatchBlock              int    `ini:"max_batch_block"`
	Endpoint                   string `ini:"endpoint"`
	User                       string `ini:"user"`
	Password                   string `ini:"password"`
	OmniEndpoint               string `ini:"omni_endpoint"`
	OmniUser                   string `ini:"omni_user"`
	OmniPassword               string `ini:"omni_password"`
	JSONSchemaFile             string `ini:"json_schema_file"`
	JSONSchemaValidationEnable bool   `ini:"json_schema_validation_enable"`
}

type CronBCH

type CronBCH struct {
	UpdateMetaExpr    string `ini:"update_meta_expr"`
	GetBatchBlockExpr string `ini:"get_batch_block_expr"`
}

type CronBSV

type CronBSV struct {
	UpdateMetaExpr    string `ini:"update_meta_expr"`
	GetBatchBlockExpr string `ini:"get_batch_block_expr"`
}

type CronBTC

type CronBTC struct {
	UpdateMetaExpr    string `ini:"update_meta_expr"`
	GetBatchBlockExpr string `ini:"get_batch_block_expr"`
}

type CronDOGE

type CronDOGE struct {
	UpdateMetaExpr    string `ini:"update_meta_expr"`
	GetBatchBlockExpr string `ini:"get_batch_block_expr"`
}

type CronEOS

type CronEOS struct {
	UpdateMetaExpr string `ini:"update_meta_expr"`
}

type CronETC

type CronETC struct {
	UpdateMetaExpr             string `ini:"update_meta_expr"`
	GetBatchBlockExpr          string `ini:"get_batch_block_expr"`
	RefreshContractAddressExpr string `ini:"refresh_contract_address_expr"`
	RefreshPoolNameExpr        string `ini:"refresh_pool_name_expr"`
}

type CronETH

type CronETH struct {
	UpdateMetaExpr             string `ini:"update_meta_expr"`
	GetBatchBlockExpr          string `ini:"get_batch_block_expr"`
	RefreshContractAddressExpr string `ini:"refresh_contract_address_expr"`
	RefreshPoolNameExpr        string `ini:"refresh_pool_name_expr"`
}

type CronLTC

type CronLTC struct {
	UpdateMetaExpr    string `ini:"update_meta_expr"`
	GetBatchBlockExpr string `ini:"get_batch_block_expr"`
}

type CronTRON

type CronTRON struct {
	UpdateMetaExpr string `ini:"update_meta_expr"`
}

type CronXLM

type CronXLM struct {
	UpdateMetaExpr string `ini:"update_meta_expr"`
}

type CronXRP

type CronXRP struct {
	UpdateMetaExpr      string `ini:"update_meta_expr"`
	GetBatchBlockExpr   string `ini:"get_batch_block_expr"`
	RefreshPoolNameExpr string `ini:"refresh_pool_name_expr"`
}

type DOGE

type DOGE struct {
	Enable                     bool   `ini:"enable"`
	DatabaseEnable             bool   `ini:"database_enable"`
	MaxBatchBlock              int    `ini:"max_batch_block"`
	Endpoint                   string `ini:"endpoint"`
	User                       string `ini:"user"`
	Password                   string `ini:"password"`
	JSONSchemaFile             string `ini:"json_schema_file"`
	JSONSchemaValidationEnable bool   `ini:"json_schema_validation_enable"`
}

type Database

type Database struct {
	Type         string
	Host         string
	Port         string
	Database     string
	User         string
	Password     string
	MaxOpenConns int
	MaxIdleConns int
	SQLLogFile   string `ini:"sql_log_file"`
	Debug        bool
}

type Deploy

type Deploy struct {
	Mode string
}

type EOS

type EOS struct {
	Enable                     bool   `ini:"enable"`
	DatabaseEnable             bool   `ini:"database_enable"`
	DatabaseWorkerBuffer       int    `ini:"database_worker_buffer"`
	DatabaseWorkerNumber       int    `ini:"database_worker_number"`
	SkipHeight                 int    `ini:"skip_height"`
	SkipMissBlock              bool   `ini:"skip_miss_block"`
	MaxBatchBlock              int    `ini:"max_batch_block"`
	Endpoint                   string `ini:"endpoint"`
	KafkaProxyHost             string `ini:"kafka_proxy_host"`
	KafkaProxyPort             string `ini:"kafka_proxy_port"`
	User                       string `ini:"user"`
	Password                   string `ini:"password"`
	JSONSchemaFile             string `ini:"json_schema_file"`
	JSONSchemaValidationEnable bool   `ini:"json_schema_validation_enable"`
}

type ETC

type ETC struct {
	Enable                     bool   `ini:"enable"`
	DatabaseEnable             bool   `ini:"database_enable"`
	DatabaseWorkerBuffer       int    `ini:"database_worker_buffer"`
	DatabaseWorkerNumber       int    `ini:"database_worker_number"`
	SkipHeight                 int    `ini:"skip_height"`
	SkipMissBlock              bool   `ini:"skip_miss_block"`
	MaxBatchBlock              int    `ini:"max_batch_block"`
	Endpoint                   string `ini:"endpoint"`
	User                       string `ini:"user"`
	Password                   string `ini:"password"`
	JSONSchemaFile             string `ini:"json_schema_file"`
	JSONSchemaValidationEnable bool   `ini:"json_schema_validation_enable"`
	ConcurrentHeight           int    `ini:"concurrent_height"`
}

type ETH

type ETH struct {
	Enable                     bool   `ini:"enable"`
	DatabaseEnable             bool   `ini:"database_enable"`
	DatabaseWorkerBuffer       int    `ini:"database_worker_buffer"`
	DatabaseWorkerNumber       int    `ini:"database_worker_number"`
	MaxBatchBlock              int    `ini:"max_batch_block"`
	Endpoint                   string `ini:"endpoint"`
	User                       string `ini:"user"`
	Password                   string `ini:"password"`
	JSONSchemaFile             string `ini:"json_schema_file"`
	JSONSchemaValidationEnable bool   `ini:"json_schema_validation_enable"`
	ConcurrentHeight           int    `ini:"concurrent_height"`
}

type Global

type Global struct {
	MaxProcess int
	LocalMode  bool
}

type Kafka

type Kafka struct {
	Topic        string
	ClientID     string `ini:"client_id"`
	GroupID      string `ini:"group_id"`
	BrokerList   string
	BufferSize   int
	ReturnErrors bool `ini:"return_errors"`
}

type KafkaConsumer

type KafkaConsumer struct {
	BrokerList   string
	BufferSize   int
	ClientID     string `ini:"client_id"`
	GroupID      string `ini:"group_id"`
	ReturnErrors bool
}

type KafkaProducer

type KafkaProducer struct {
	BrokerList       string
	BufferSize       int
	ProducerNum      int
	FlushMessages    int
	FlushFrequency   int
	FlushMaxMessages int
	Timeout          int
	ReturnErrors     bool
}

type LTC

type LTC struct {
	Enable                     bool   `ini:"enable"`
	DatabaseEnable             bool   `ini:"database_enable"`
	MaxBatchBlock              int    `ini:"max_batch_block"`
	Endpoint                   string `ini:"endpoint"`
	User                       string `ini:"user"`
	Password                   string `ini:"password"`
	JSONSchemaFile             string `ini:"json_schema_file"`
	JSONSchemaValidationEnable bool   `ini:"json_schema_validation_enable"`
}

type Listen

type Listen struct {
	Host string
	Port string
}

type Location

type Location struct {
	Enable        bool   `ini:"enable"`
	DatabaseFiles string `ini:"database_files"`
}

type Metric

type Metric struct {
	Enable bool
	Host   string
	Port   string
	Path   string
}

type Profiling

type Profiling struct {
	Enable bool
	Host   string
	Port   string
}

type SplitterSettings

type SplitterSettings struct {
	GlobalSetting       Global
	ProfilingSetting    Profiling
	MetricSetting       Metric
	BCHSetting          BCH
	BTCSetting          BTC
	ETCSetting          ETC
	ETHSetting          ETH
	EOSSetting          EOS
	LTCSetting          LTC
	DOGESetting         DOGE
	BSVSetting          BSV
	TRONSetting         TRON
	XRPSetting          XRP
	XLMSetting          XLM
	KafkaBCHSetting     Kafka
	KafkaBTCSetting     Kafka
	KafkaETCSetting     Kafka
	KafkaETHSetting     Kafka
	KafkaEOSSetting     Kafka
	KafkaTRONSetting    Kafka
	KafkaLTCSetting     Kafka
	KafkaDOGESetting    Kafka
	KafkaBSVSetting     Kafka
	KafkaXRPSetting     Kafka
	KafkaXLMSetting     Kafka
	DatabaseBCHSetting  Database
	DatabaseBTCSetting  Database
	DatabaseETCSetting  Database
	DatabaseETHSetting  Database
	DatabaseEOSSetting  Database
	DatabaseTRONSetting Database
	DatabaseLTCSetting  Database
	DatabaseDOGESetting Database
	DatabaseBSVSetting  Database
	DatabaseXRPSetting  Database
	DatabaseXLMSetting  Database
	CronBCHSetting      CronBCH
	CronBTCSetting      CronBTC
	CronETCSetting      CronETC
	CronETHSetting      CronETH
	CronEOSSetting      CronEOS
	CronLTCSetting      CronLTC
	CronXLMSetting      CronXLM
	CronDOGESetting     CronDOGE
	CronBSVSetting      CronBSV
	CronTRONSetting     CronTRON
	CronXRPSetting      CronXRP
}
var SplitterConfig *SplitterSettings

type TRON

type TRON struct {
	Enable                     bool   `ini:"enable"`
	DatabaseEnable             bool   `ini:"database_enable"`
	DatabaseWorkerBuffer       int    `ini:"database_worker_buffer"`
	DatabaseWorkerNumber       int    `ini:"database_worker_number"`
	SkipHeight                 int    `ini:"skip_height"`
	SkipMissBlock              bool   `ini:"skip_miss_block"`
	MaxBatchBlock              int    `ini:"max_batch_block"`
	ConcurrentHeight           int    `ini:"concurrent_height"`
	Endpoint                   string `ini:"endpoint"`
	User                       string `ini:"user"`
	Password                   string `ini:"password"`
	JSONSchemaFile             string `ini:"json_schema_file"`
	JSONSchemaValidationEnable bool   `ini:"json_schema_validation_enable"`
}

type XLM

type XLM struct {
	Enable                     bool   `ini:"enable"`
	DatabaseEnable             bool   `ini:"database_enable"`
	DatabaseWorkerBuffer       int    `ini:"database_worker_buffer"`
	DatabaseWorkerNumber       int    `ini:"database_worker_number"`
	MaxBatchBlock              int    `ini:"max_batch_block"`
	Endpoint                   string `ini:"endpoint"`
	JSONSchemaFile             string `ini:"json_schema_file"`
	JSONSchemaValidationEnable bool   `ini:"json_schema_validation_enable"`
	ConcurrentHeight           int64  `ini:"concurrent_height"`
	ConcurrentHTTP             int64  `ini:"concurrent_http"`
}

type XRP

type XRP struct {
	Enable                     bool   `ini:"enable"`
	DatabaseEnable             bool   `ini:"database_enable"`
	DatabaseWorkerBuffer       int    `ini:"database_worker_buffer"`
	DatabaseWorkerNumber       int    `ini:"database_worker_number"`
	SkipHeight                 int    `ini:"skip_height"`
	SkipMissBlock              bool   `ini:"skip_miss_block"`
	MaxBatchBlock              int    `ini:"max_batch_block"`
	Endpoint                   string `ini:"endpoint"`
	KafkaProxyHost             string `ini:"kafka_proxy_host"`
	KafkaProxyPort             string `ini:"kafka_proxy_port"`
	User                       string `ini:"user"`
	Password                   string `ini:"password"`
	JSONSchemaFile             string `ini:"json_schema_file"`
	JSONSchemaValidationEnable bool   `ini:"json_schema_validation_enable"`
}

Jump to

Keyboard shortcuts

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