Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Cmd = &cobra.Command{ Use: "server", Short: "Run an Eth project server for receiving Ethereum block numbers.", Run: func(cmd *cobra.Command, args []string) { RunServer() }, PreRunE: func(cmd *cobra.Command, args []string) error { if useRedis { if redisHost == "" { return fmt.Errorf("--use-redis called without --redis-host") } if redisPort <= 0 { return fmt.Errorf("--use-redis called without --redis-port") } if redisDb < 0 { return fmt.Errorf("--use-redis called without --redis-db") } } if useMySQL { if mySQLHost == "" { return fmt.Errorf("--use-mysql called without --mysql-host") } if mySQLUser == "" { return fmt.Errorf("--use-mysql called without --mysql-user") } if mySQLPass == "" { return fmt.Errorf("--use-mysql called without --mysql-pass") } if mySQLDb == "" { return fmt.Errorf("--use-mysql called without --mysql-db") } } return nil }, }
Cmd represents the server command
View Source
var RedisClientCountKey = "eth:ip_addresses"
View Source
var RedisHashTimestampKey = "eth:hashes"
View Source
var Timeout time.Duration = 1
Functions ¶
func ClientProcessor ¶
func MySQLProcessor ¶
func MySQLProcessor()
func RedisProcessor ¶
func RedisProcessor()
Types ¶
type EthereumData ¶
type EthereumData struct { ID uint `gorm:"primary_key"` Hash string `gorm:"size:64"` Payload string `sql:"type:text"` }
func (EthereumData) TableName ¶
func (EthereumData) TableName() string
Click to show internal directories.
Click to hide internal directories.