Documentation ¶
Index ¶
- Constants
- Variables
- func HandleCosmosHubBlock(w *Watcher, data coretypes.ResultEvent)
- func HandleCosmosHubLPCreated(w *Watcher, data coretypes.ResultEvent, chainName, key string, height int64)
- func HandleIBCAckPacket(w *Watcher, data coretypes.ResultEvent, chainName, txHash string, height int64)
- func HandleIBCReceivePacket(w *Watcher, data coretypes.ResultEvent, chainName, txHash string, height int64)
- func HandleIBCSenderEvent(w *Watcher, data coretypes.ResultEvent, chainName, txHash, key string, ...)
- func HandleIBCTimeoutPacket(w *Watcher, data coretypes.ResultEvent, chainName, txHash string, height int64)
- func HandleMessage(w *Watcher, data coretypes.ResultEvent)
- func HandleNewBlock(w *Watcher, data coretypes.ResultEvent)
- func HandleSwapTransaction(w *Watcher, data coretypes.ResultEvent, chainName, key string, height int64)
- func Start(watcher *Watcher, ctx context.Context)
- type Ack
- type Config
- type DataHandler
- type Events
- type VerifyTraceResponse
- type Watcher
- type WsResponse
Constants ¶
View Source
const ( EventsTx = "tm.event='Tx'" EventsBlock = "tm.event='NewBlock'" )
Variables ¶
View Source
var ( EventsToSubTo = []string{EventsTx, EventsBlock} StandardMappings = map[string][]DataHandler{ EventsTx: { HandleMessage, }, EventsBlock: { HandleNewBlock, }, } CosmosHubMappings = map[string][]DataHandler{ EventsTx: { HandleMessage, }, EventsBlock: { HandleNewBlock, HandleCosmosHubBlock, }, } )
Functions ¶
func HandleCosmosHubBlock ¶
func HandleCosmosHubBlock(w *Watcher, data coretypes.ResultEvent)
func HandleCosmosHubLPCreated ¶
func HandleCosmosHubLPCreated(w *Watcher, data coretypes.ResultEvent, chainName, key string, height int64)
func HandleIBCAckPacket ¶
func HandleIBCAckPacket(w *Watcher, data coretypes.ResultEvent, chainName, txHash string, height int64)
func HandleIBCReceivePacket ¶
func HandleIBCReceivePacket(w *Watcher, data coretypes.ResultEvent, chainName, txHash string, height int64)
func HandleIBCSenderEvent ¶
func HandleIBCSenderEvent(w *Watcher, data coretypes.ResultEvent, chainName, txHash, key string, height int64)
func HandleIBCTimeoutPacket ¶
func HandleIBCTimeoutPacket(w *Watcher, data coretypes.ResultEvent, chainName, txHash string, height int64)
func HandleMessage ¶
func HandleMessage(w *Watcher, data coretypes.ResultEvent)
func HandleNewBlock ¶
func HandleNewBlock(w *Watcher, data coretypes.ResultEvent)
func HandleSwapTransaction ¶
func HandleSwapTransaction(w *Watcher, data coretypes.ResultEvent, chainName, key string, height int64)
Types ¶
type Config ¶
type Config struct { DatabaseConnectionURL string `validate:"required"` RedisURL string `validate:"required,hostname_port"` ApiURL string `validate:"required,url"` ProfilingServerURL string `validate:"hostname_port"` Debug bool JSONLogs bool }
func ReadConfig ¶
type DataHandler ¶
type DataHandler func(watcher *Watcher, event coretypes.ResultEvent)
type VerifyTraceResponse ¶
type VerifyTraceResponse struct { VerifyTrace struct { IbcDenom string `json:"ibc_denom"` BaseDenom string `json:"base_denom"` Verified bool `json:"verified"` Path string `json:"path"` Trace []struct { Channel string `json:"channel"` Port string `json:"port"` ChainName string `json:"chain_name"` CounterpartyName string `json:"counterparty_name"` } `json:"trace"` } `json:"verify_trace"` }
type Watcher ¶
type Watcher struct { Name string DataChannel chan coretypes.ResultEvent ErrorChannel chan error // contains filtered or unexported fields }
func NewWatcher ¶
type WsResponse ¶
type WsResponse struct {
Event coretypes.ResultEvent `json:"result"`
}
Click to show internal directories.
Click to hide internal directories.