Documentation ¶
Index ¶
- Constants
- Variables
- func CheckSuperfluousIndexKeys(keys []string) []string
- func DoConfigureLogger(logPath string, logLevel string, prettyLogging bool)
- func ParseJSONFilterConfig(configJSON []byte) ([]filter.BlockEventFilter, []filter.RollingWindowBlockEventFilter, ...)
- func ParseJSONFilterConfigFromType(filterType string, configJSON []byte) (filter.BlockEventFilter, error)
- func ParseLifecycleConfig(lifecycleConfig []json.RawMessage) ([]filter.BlockEventFilter, []filter.RollingWindowBlockEventFilter, error)
- func ParseTXMessageTypeConfig(messageTypeConfigs []json.RawMessage) ([]filter.MessageTypeFilter, error)
- func SetChainConfig(prefix string)
- func SetupDatabaseFlags(databaseConf *Database, cmd *cobra.Command)
- func SetupIndexSpecificFlags(conf *IndexConfig, cmd *cobra.Command)
- func SetupLogFlags(logConf *log, cmd *cobra.Command)
- func SetupMongoDBFlags(mongoConf *MongoConf, cmd *cobra.Command)
- func SetupProbeFlags(probeConf *Probe, cmd *cobra.Command)
- func SetupRedisFlags(redisConf *RedisConf, cmd *cobra.Command)
- func SetupServerFlags(serverConf *Server, cmd *cobra.Command)
- func SetupThrottlingFlag(throttlingValue *float64, cmd *cobra.Command)
- func SingleBlockEventFilterIncludes(val string) bool
- type BlockEventFilterConfig
- type Database
- type IndexBase
- type IndexConfig
- type Logger
- func (l *Logger) Debug(msg string, err ...error)
- func (l *Logger) Debugf(msg string, args ...interface{})
- func (l *Logger) Error(msg string, err ...error)
- func (l *Logger) Errorf(msg string, args ...interface{})
- func (l *Logger) Fatal(msg string, err ...error)
- func (l *Logger) Fatalf(msg string, args ...interface{})
- func (l *Logger) Info(msg string, err ...error)
- func (l *Logger) Infof(msg string, args ...interface{})
- func (l *Logger) Panic(msg string, err ...error)
- func (l *Logger) Panicf(msg string, args ...interface{})
- func (l *Logger) Warn(msg string, err ...error)
- func (l *Logger) Warnf(msg string, args ...interface{})
- func (l *Logger) ZDeubg() *zerolog.Event
- func (l *Logger) ZInfo() *zerolog.Event
- type MessageTypeFilterConfig
- type MongoConf
- type Probe
- type RedisConf
- type RetryBase
- type Server
Constants ¶
View Source
const ( EventTypeKey = "event_type" EventTypeAndAttributeValueKey = "event_type_and_attribute_value" RegexEventTypeKey = "regex_event_type" RollingWindowKey = "rolling_window" MessageTypeKey = "message_type" MessageTypeRegex = "message_type_regex" )
Variables ¶
View Source
var MessageTypeFilterKeys = []string{ MessageTypeKey, MessageTypeRegex, }
View Source
var SingleBlockEventFilterKeys = []string{ EventTypeKey, EventTypeAndAttributeValueKey, RegexEventTypeKey, }
Functions ¶
func DoConfigureLogger ¶
func ParseJSONFilterConfig ¶
func ParseJSONFilterConfig(configJSON []byte) ([]filter.BlockEventFilter, []filter.RollingWindowBlockEventFilter, []filter.BlockEventFilter, []filter.RollingWindowBlockEventFilter, []filter.MessageTypeFilter, error)
func ParseJSONFilterConfigFromType ¶
func ParseJSONFilterConfigFromType(filterType string, configJSON []byte) (filter.BlockEventFilter, error)
func ParseLifecycleConfig ¶
func ParseLifecycleConfig(lifecycleConfig []json.RawMessage) ([]filter.BlockEventFilter, []filter.RollingWindowBlockEventFilter, error)
func ParseTXMessageTypeConfig ¶
func ParseTXMessageTypeConfig(messageTypeConfigs []json.RawMessage) ([]filter.MessageTypeFilter, error)
func SetChainConfig ¶
func SetChainConfig(prefix string)
SetChainConfig Set the chain prefix e.g. juno (prefix for account addresses).
func SetupDatabaseFlags ¶
func SetupIndexSpecificFlags ¶
func SetupIndexSpecificFlags(conf *IndexConfig, cmd *cobra.Command)
func SetupLogFlags ¶
func SetupMongoDBFlags ¶
func SetupProbeFlags ¶
func SetupRedisFlags ¶
func SetupServerFlags ¶
func SetupThrottlingFlag ¶
Types ¶
type BlockEventFilterConfig ¶
type BlockEventFilterConfig struct { Type string `json:"type"` Subfilters []json.RawMessage `json:"subfilters"` Inclusive bool `json:"inclusive"` }
type IndexBase ¶ added in v0.0.91
type IndexBase struct { RetryBase Mode string `mapstructure:"mode"` ModeTopics *[]string `mapstructure:"mode-storage-topics"` ModeCoolDownMins int `mapstructure:"mode-cooldown-mins"` ModeCoolDownCount int `mapstructure:"mode-cooldown-count"` ModeBlocksStep int64 `mapstructure:"mode-blocks-step"` ReindexMessageType string `mapstructure:"reindex-message-type"` ReattemptFailedBlocks bool `mapstructure:"reattempt-failed-blocks"` StartBlock int64 `mapstructure:"start-block"` EndBlock int64 `mapstructure:"end-block"` BlockInputFile string `mapstructure:"block-input-file"` ReIndex bool `mapstructure:"reindex"` RPCWorkers int64 `mapstructure:"rpc-workers"` BlockTimer int64 `mapstructure:"block-timer"` WaitForChain bool `mapstructure:"wait-for-chain"` WaitForChainDelay int64 `mapstructure:"wait-for-chain-delay"` TransactionIndexingEnabled bool `mapstructure:"index-transactions"` ExitWhenCaughtUp bool `mapstructure:"exit-when-caught-up"` FilterFile string `mapstructure:"filter-file"` // contains filtered or unexported fields }
type IndexConfig ¶
type IndexConfig struct { Database Database ConfigFileLocation string Base IndexBase Log log Probe Probe Flags flags Server Server RedisConf RedisConf MongoConf MongoConf }
func (*IndexConfig) Validate ¶
func (conf *IndexConfig) Validate() error
type Logger ¶
type Logger struct{}
var Log *Logger
Log is exposed on the config as a drop-in replacement for our old logger
type MessageTypeFilterConfig ¶
Click to show internal directories.
Click to hide internal directories.