Documentation ¶
Index ¶
- Constants
- Variables
- func GetDataSourceHash(c *Context, l *Logger, id types.DataSourceID) (string, error)
- func GetEventValue(events []abci.Event, evType string, evKey string) (string, error)
- func GetEventValues(events []abci.Event, evType string, evKey string) (res []string)
- func GetExecutable(c *Context, l *Logger, hash string) ([]byte, error)
- func GetRequest(c *Context, l *Logger, id types.RequestID) (types.Request, error)
- func Main()
- func MustAtoi(num string) int64
- func NewYodaCollector(c *Context) prometheus.Collector
- func SubmitReport(c *Context, l *Logger, keyIndex int64, reports []ReportMsgWithKey)
- type Config
- type Context
- type FeeEstimationData
- type Logger
- type ReportMsgWithKey
Constants ¶
View Source
const ( TxQuery = "tm.event = 'Tx' AND request.id EXISTS" // EventChannelCapacity is a buffer size of channel between node and this program EventChannelCapacity = 2000 )
Variables ¶
View Source
var (
DefaultYodaHome string
)
Global instances.
Functions ¶
func GetDataSourceHash ¶
GetDataSourceHash fetches data source hash by id
func GetEventValue ¶
GetEventValue checks and returns the exact value in the given log with the given type and key.
func GetEventValues ¶
GetEventValues returns the list of all values in the given log with the given type and key.
func GetExecutable ¶
GetExecutable fetches data source executable using the provided client.
func GetRequest ¶
GetRequest fetches request by id
func NewYodaCollector ¶
func NewYodaCollector(c *Context) prometheus.Collector
func SubmitReport ¶
func SubmitReport(c *Context, l *Logger, keyIndex int64, reports []ReportMsgWithKey)
Types ¶
type Config ¶
type Config struct { ChainID string `mapstructure:"chain-id"` // ChainID of the target chain NodeURI string `mapstructure:"node"` // Remote RPC URI of BandChain node to connect to Validator string `mapstructure:"validator"` // The validator address that I'm responsible for GasPrices string `mapstructure:"gas-prices"` // Gas prices of the transaction LogLevel string `mapstructure:"log-level"` // Log level of the logger Executor string `mapstructure:"executor"` // Executor name and URL (example: "Executor name:URL") BroadcastTimeout string `mapstructure:"broadcast-timeout"` // The time that Yoda will wait for tx commit RPCPollInterval string `mapstructure:"rpc-poll-interval"` // The duration of rpc poll interval MaxTry uint64 `mapstructure:"max-try"` // The maximum number of tries to submit a report transaction MaxReport uint64 `mapstructure:"max-report"` // The maximum number of reports in one transaction MetricsListenAddr string `mapstructure:"metrics-listen-addr"` // Address to listen on for prometheus metrics }
Config data structure for yoda daemon.
type FeeEstimationData ¶
type FeeEstimationData struct {
// contains filtered or unexported fields
}
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
func NewLogger ¶
func NewLogger(level log.FilterFunc) *Logger
type ReportMsgWithKey ¶
type ReportMsgWithKey struct {
// contains filtered or unexported fields
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.