Discover Packages
github.com/devblac/watch-tower
internal
config
package
Version:
v0.1.1
Opens a new window with list of versions in this module.
Published: Dec 22, 2025
License: MIT
Opens a new window with license information.
Imports: 8
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
type Config struct {
Version int `yaml:"version"`
Global GlobalConfig `yaml:"global"`
Sources []Source `yaml:"sources"`
Rules []Rule `yaml:"rules"`
Sinks []Sink `yaml:"sinks"`
}
Config holds the YAML configuration.
Load reads, interpolates env vars, parses YAML, and validates.
Validate performs small, direct schema checks.
type Dedupe struct {
Key string `yaml:"key"`
TTL string `yaml:"ttl"`
}
type GlobalConfig struct {
DBPath string `yaml:"db_path"`
Confirmations map[string ]uint64 `yaml:"confirmations"`
}
type MatchSpec struct {
Type string `yaml:"type"`
Contract string `yaml:"contract"`
Event string `yaml:"event"`
AppID uint64 `yaml:"app_id"`
Where []string `yaml:"where"`
}
type RateLimit struct {
Capacity float64 `yaml:"capacity"`
Rate float64 `yaml:"rate"`
}
type Rule struct {
ID string `yaml:"id"`
Source string `yaml:"source"`
Match MatchSpec `yaml:"match"`
Sinks []string `yaml:"sinks"`
Dedupe *Dedupe `yaml:"dedupe,omitempty"`
RateLimit *RateLimit `yaml:"rate_limit,omitempty"`
}
type Sink struct {
ID string `yaml:"id"`
Type string `yaml:"type"`
WebhookURL string `yaml:"webhook_url"`
Template string `yaml:"template"`
URL string `yaml:"url"`
Method string `yaml:"method"`
}
type Source struct {
ID string `yaml:"id"`
Type string `yaml:"type"`
RPCURL string `yaml:"rpc_url"`
StartBlock string `yaml:"start_block"`
ABIDirs []string `yaml:"abi_dirs"`
AlgodURL string `yaml:"algod_url"`
IndexerURL string `yaml:"indexer_url"`
StartRound string `yaml:"start_round"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.