Documentation ¶
Index ¶
- func Error__get_defs() map[string]gf_core.Error_def
- func Eth_favorites__tx_add(p_tx_id_hex_str string, p_ctx context.Context, p_runtime *GF_runtime) *gf_core.GF_error
- func Eth_miners__db__get_info(p_miner_address_str string, p_metrics *GF_metrics, p_ctx context.Context, ...) (map[string]*GF_eth__miner__int, *gf_core.GF_error)
- func Eth_peers__db__write(p_peer_new_lifecycle *GF_eth_peer__new_lifecycle, p_ctx context.Context, ...) *gf_core.GF_error
- func Eth_peers__init_continuous_metrics(p_metrics *GF_metrics, p_runtime *GF_runtime)
- func Eth_rpc__call(p_input_json_str string, p_eth_node_host_str string, ...) (map[string]interface{}, *gf_core.GF_error)
- func Eth_rpc__init(p_host_str string, p_geth_port_int int, p_runtime_sys *gf_core.Runtime_sys) (*ethclient.Client, *gf_core.GF_error)
- func Http__get_arg__acc_address_hex(p_req *http.Request, p_runtime_sys *gf_core.Runtime_sys) (string, *gf_core.GF_error)
- func Http__get_arg__block_num(p_resp http.ResponseWriter, p_req *http.Request, ...) (uint64, *gf_core.GF_error)
- func Http__get_arg__block_range(p_resp http.ResponseWriter, p_req *http.Request, ...) (uint64, uint64, *gf_core.GF_error)
- func Http__get_arg__miner_addr(p_resp http.ResponseWriter, p_req *http.Request, ...) (string, *gf_core.GF_error)
- func Http__get_arg__tx_id_hex(p_resp http.ResponseWriter, p_req *http.Request, ...) (string, *gf_core.GF_error)
- func Metrics__init_server(p_port_int int)
- func Sentry__init(p_sentry_endpoint_uri_str string)
- func TgetRuntime() (*GF_runtime, *GF_metrics, error)
- type Error_def
- type GF_config
- type GF_eth__miner__int
- type GF_eth_peer__db_aggregate__name_group
- type GF_eth_peer__db_aggregate__name_group_counts
- type GF_eth_peer__new_lifecycle
- type GF_metrics
- type GF_py_plugins
- type GF_runtime
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Error__get_defs ¶
-------------------------------------------------
func Eth_favorites__tx_add ¶
func Eth_favorites__tx_add(p_tx_id_hex_str string, p_ctx context.Context, p_runtime *GF_runtime) *gf_core.GF_error
-------------------------------------------------
func Eth_miners__db__get_info ¶
func Eth_miners__db__get_info(p_miner_address_str string, p_metrics *GF_metrics, p_ctx context.Context, p_runtime *GF_runtime) (map[string]*GF_eth__miner__int, *gf_core.GF_error)
------------------------------------------------- DB__GET_INFO
func Eth_peers__db__write ¶
func Eth_peers__db__write(p_peer_new_lifecycle *GF_eth_peer__new_lifecycle, p_ctx context.Context, p_metrics *GF_metrics, p_runtime *GF_runtime) *gf_core.GF_error
------------------------------------------------- DB_WRITE
func Eth_peers__init_continuous_metrics ¶
func Eth_peers__init_continuous_metrics(p_metrics *GF_metrics, p_runtime *GF_runtime)
func Eth_rpc__call ¶
func Eth_rpc__call(p_input_json_str string, p_eth_node_host_str string, p_error_data_map map[string]interface{}, p_ctx context.Context, p_runtime_sys *gf_core.Runtime_sys) (map[string]interface{}, *gf_core.GF_error)
-------------------------------------------------
func Eth_rpc__init ¶
func Eth_rpc__init(p_host_str string, p_geth_port_int int, p_runtime_sys *gf_core.Runtime_sys) (*ethclient.Client, *gf_core.GF_error)
------------------------------------------------- INIT
func Http__get_arg__acc_address_hex ¶
func Http__get_arg__acc_address_hex(p_req *http.Request, p_runtime_sys *gf_core.Runtime_sys) (string, *gf_core.GF_error)
-------------------------------------------------
func Http__get_arg__block_num ¶
func Http__get_arg__block_num(p_resp http.ResponseWriter, p_req *http.Request, p_runtime_sys *gf_core.Runtime_sys) (uint64, *gf_core.GF_error)
-------------------------------------------------
func Http__get_arg__block_range ¶
func Http__get_arg__block_range(p_resp http.ResponseWriter, p_req *http.Request, p_runtime_sys *gf_core.Runtime_sys) (uint64, uint64, *gf_core.GF_error)
-------------------------------------------------
func Http__get_arg__miner_addr ¶
func Http__get_arg__miner_addr(p_resp http.ResponseWriter, p_req *http.Request, p_runtime_sys *gf_core.Runtime_sys) (string, *gf_core.GF_error)
-------------------------------------------------
func Http__get_arg__tx_id_hex ¶
func Http__get_arg__tx_id_hex(p_resp http.ResponseWriter, p_req *http.Request, p_runtime_sys *gf_core.Runtime_sys) (string, *gf_core.GF_error)
-------------------------------------------------
func Metrics__init_server ¶
func Metrics__init_server(p_port_int int)
------------------------------------------------- INIT_SERVER
func Sentry__init ¶
func Sentry__init(p_sentry_endpoint_uri_str string)
-------------------------------------------------
func TgetRuntime ¶
func TgetRuntime() (*GF_runtime, *GF_metrics, error)
---------------------------------------------------
Types ¶
type Error_def ¶
type Error_def struct {
Descr_str string
}
-------------------------------------------------
type GF_config ¶
type GF_config struct { // PORTS Port_str string `mapstructure:"port"` Port_metrics_str string `mapstructure:"port_metrics"` // MONGODB - this is the dedicated mongodb DB Mongodb_host_str string `mapstructure:"mongodb_host"` Mongodb_db_name_str string `mapstructure:"mongodb_db_name"` // AWS_SQS AWS_SQS_queue_str string `mapstructure:"aws_sqs_queue"` // WORKERS_AWS_DISCOVERY - if AWS API's should be used for workers discovery, // or if the hardcoded workers_host config is used. Workers_aws_discovery_bool bool `mapstructure:"workers_aws_discovery"` // WORKERS_HOSTS - list of "," separated hosts, that are used by gf_eth_monitor__masters // to reach a worker_inspector service running on each worker. Workers_hosts_str string `mapstructure:"workers_hosts"` // SENTRY_ENDPOINT Sentry_endpoint_str string `mapstructure:"sentry_endpoint"` // EVENTS - flag to turn on/off event consumption and processing from queues. // mostly used for debugging and testing. Events_consume_bool bool `mapstructure:"events_consume"` // PY_PLUGINS Py_plugins_dir_path_str string `mapstructure:"py_plugins_dir_path"` // EXTERN_SERVICES AlchemyAPIkeyStr string `mapstructure:"alchemy_api_key"` OpenSeaAPIkeyStr string `mapstructure:"opensea_api_key"` }
type GF_eth__miner__int ¶
type GF_eth__miner__int struct { Name_str string `bson:"name_str" json:"name_str"` Address_hex_str string `bson:"addr_str" json:"address_hex_str"` }
-------------------------------------------------
type GF_eth_peer__db_aggregate__name_group ¶
type GF_eth_peer__db_aggregate__name_group struct { Name_str string `bson:"_id" json:"name_str"` Peers_remote_ips_lst []string `bson:"peers_remote_ips_lst" json:"peers_remote_ips_lst"` Count_int int `bson:"count_int" json:"count_int"` }
func Eth_peers__db__get_pipeline ¶
func Eth_peers__db__get_pipeline(p_metrics *GF_metrics, p_runtime *GF_runtime) ([]*GF_eth_peer__db_aggregate__name_group, *gf_core.GF_error)
------------------------------------------------- GET_PIPELINE
type GF_eth_peer__db_aggregate__name_group_counts ¶
type GF_eth_peer__db_aggregate__name_group_counts struct { Name_str string `bson:"_id" json:"name_str"` Count_int int `bson:"count_int" json:"count_int"` }
func Eth_peers__db__get_count ¶
func Eth_peers__db__get_count(p_metrics *GF_metrics, p_runtime *GF_runtime) ([]*GF_eth_peer__db_aggregate__name_group_counts, *gf_core.GF_error)
-------------------------------------------------
type GF_eth_peer__new_lifecycle ¶
type GF_eth_peer__new_lifecycle struct { T_str string `bson:"t"` // "peer_new_lifecycle" V_str string `bson:"v"` // version - "v0",... Peer_name_str string `bson:"peer_name_str"` Peer_enode_id_str string `bson:"peer_enode_id_str"` Peer_remote_ip_str string `bson:"peer_remote_ip_str"` Node_public_ip_str string `bson:"node_public_ip_str"` Event_time_unix_f float64 `bson:"event_time_unix_f"` }
------------------------------------------------- GF_ETH_PEER__NEW_LIFECYCLE
type GF_metrics ¶
type GF_metrics struct { // SQS SQS__msgs_num__counter prometheus.Counter // PEERS Peers__http_req_num__get_peers__counter prometheus.Counter Peers__unique_names_num__gauge prometheus.Gauge // BLOCK Block__db_count__gauge prometheus.Gauge Block__indexed_num__counter prometheus.Counter // TX Tx__db_count__gauge prometheus.Gauge Tx__indexed_num__counter prometheus.Counter // TX_TRACE Tx_trace__worker_inspector_durration__gauge prometheus.Gauge Tx_trace__py_plugin__plot_durration__gauge prometheus.Gauge Tx_trace__db_count__gauge prometheus.Gauge // DB DB__writes_num__new_peer_lifecycle__counter prometheus.Counter // ERRORS Errs_num__counter prometheus.Counter }
-------------------------------------------------
func Metrics__init ¶
func Metrics__init(p_port_int int) (*GF_metrics, *gf_core.GF_error)
------------------------------------------------- INIT
type GF_py_plugins ¶
type GF_py_plugins struct {
Base_dir_path_str string
}
-------------------------------------------------
type GF_runtime ¶
type GF_runtime struct { Config *GF_config Py_plugins *GF_py_plugins RuntimeSys *gf_core.RuntimeSys }
-------------------------------------------------------------
func RuntimeGet ¶
func RuntimeGet(p_config *GF_config, p_runtime_sys *gf_core.Runtime_sys) (*GF_runtime, error)
-------------------------------------------------