Documentation ¶
Index ¶
- Constants
- func GetNodeIndexFromCmdline(cmdline []string) (int, error)
- func GetNodeTypeFromCmdline(cmdline []string) string
- func GetParamValueFromCmdline(cmdline []string, param ...string) string
- func GetPortFromCmdline(cmdline []string) (int, error)
- func GetProcesses(name string, port ...uint32) ([]*process.Process, error)
- func GetSyncTypeFromCmdline(cmdline []string) (int, error)
- func GetZilliqaMainProcess(constants *Constants) *process.Process
- func GetZilliqadProcess() *process.Process
- func IsGeneralLookup(nt NodeType) bool
- type APICollector
- type AdminCollector
- type Constants
- func (c *Constants) Collect(ch chan<- prometheus.Metric)
- func (c *Constants) CommonLabelValues() []string
- func (c *Constants) CommonLabels() []string
- func (c *Constants) Describe(ch chan<- *prometheus.Desc)
- func (c *Constants) NodeType() NodeType
- func (c *Constants) P2PPort() uint32
- func (c *Constants) ShortPodName() string
- func (c *Constants) StartWatch()
- func (c *Constants) StopWatch()
- type NodeType
- type Options
- func (c Options) APIAddr() string
- func (c Options) APIEndpoint() string
- func (c Options) AdminEndpoint() string
- func (c *Options) BindFlags(set *pflag.FlagSet)
- func (c Options) GetAPIClient() *provider.Provider
- func (c Options) GetAdminClient() *adminclient.Client
- func (c *Options) MarshalJSON() ([]byte, error)
- func (c *Options) ToMap() map[string]interface{}
- func (c Options) WebsocketEndpoint() string
- func (c *Options) ZilliqaBinPath() string
- type ProcessInfoCollector
- type ScheduleTask
- type ScheduledCollector
- type SyncType
Constants ¶
View Source
const ( Level2Lookup = SeedPub NewLookup = SeedPrv )
View Source
const ( DefaultAPIEndpoint = "127.0.0.1:4201" DefaultAdminEndpoint = "127.0.0.1:4301" DefaultWebsocketEndpoint = "127.0.0.1:4401" )
Variables ¶
This section is empty.
Functions ¶
func GetNodeIndexFromCmdline ¶
func GetNodeTypeFromCmdline ¶
func GetPortFromCmdline ¶ added in v0.0.8
func GetProcesses ¶ added in v0.0.8
match port first, if no matched, return procs that matches name
func GetSyncTypeFromCmdline ¶
func GetZilliqaMainProcess ¶ added in v0.0.8
func GetZilliqadProcess ¶ added in v0.0.8
func IsGeneralLookup ¶ added in v0.0.8
Types ¶
type APICollector ¶
type APICollector struct {
// contains filtered or unexported fields
}
collect instant values
func NewAPICollector ¶
func NewAPICollector(constants *Constants) *APICollector
func (*APICollector) Collect ¶
func (c *APICollector) Collect(ch chan<- prometheus.Metric)
func (*APICollector) Describe ¶
func (c *APICollector) Describe(ch chan<- *prometheus.Desc)
type AdminCollector ¶
type AdminCollector struct {
// contains filtered or unexported fields
}
collect instant values
func NewAdminCollector ¶
func NewAdminCollector(constants *Constants) *AdminCollector
func (*AdminCollector) Collect ¶
func (c *AdminCollector) Collect(ch chan<- prometheus.Metric)
func (*AdminCollector) Describe ¶
func (c *AdminCollector) Describe(ch chan<- *prometheus.Desc)
type Constants ¶
type Constants struct { // k8s PodName string PodIP string Namespace string NodeName string NetworkName string // aws & testnet & genet Placement string ClusterName string PublicIP string PublicHostname string LocalIP string LocalHostname string InstanceID string InstanceType string // zilliqa binary BinPath string Version string Commit string // Desc NodeInfo *prometheus.Desc // contains filtered or unexported fields }
func NewConstants ¶ added in v0.0.8
func (*Constants) Collect ¶ added in v0.0.8
func (c *Constants) Collect(ch chan<- prometheus.Metric)
func (*Constants) CommonLabelValues ¶ added in v0.0.8
func (*Constants) CommonLabels ¶ added in v0.0.8
func (*Constants) Describe ¶ added in v0.0.8
func (c *Constants) Describe(ch chan<- *prometheus.Desc)
func (*Constants) ShortPodName ¶ added in v0.0.15
func (*Constants) StartWatch ¶ added in v0.0.8
func (c *Constants) StartWatch()
type Options ¶
type Options struct { IsMainNet bool NotCollectAPI bool NotCollectAdmin bool NotCollectWebsocket bool NotCollectProcessInfo bool // contains filtered or unexported fields }
func (Options) APIEndpoint ¶
func (Options) AdminEndpoint ¶
func (Options) GetAPIClient ¶
func (Options) GetAdminClient ¶
func (c Options) GetAdminClient() *adminclient.Client
func (*Options) MarshalJSON ¶
func (Options) WebsocketEndpoint ¶
func (*Options) ZilliqaBinPath ¶
type ProcessInfoCollector ¶
type ProcessInfoCollector struct {
// contains filtered or unexported fields
}
func NewProcessInfoCollector ¶
func NewProcessInfoCollector(constants *Constants) *ProcessInfoCollector
func (*ProcessInfoCollector) Collect ¶
func (c *ProcessInfoCollector) Collect(ch chan<- prometheus.Metric)
func (*ProcessInfoCollector) Describe ¶
func (c *ProcessInfoCollector) Describe(ch chan<- *prometheus.Desc)
type ScheduleTask ¶
type ScheduleTask struct {
// contains filtered or unexported fields
}
type ScheduledCollector ¶
type ScheduledCollector struct { // TODO: persistence-check UDStateSize prometheus.Gauge UDStateEntries prometheus.Gauge // contains filtered or unexported fields }
some
func NewScheduledCollector ¶
func NewScheduledCollector(option *Options, constants *Constants) *ScheduledCollector
func (*ScheduledCollector) CollectGetUDContractStateSizeRecords ¶
func (s *ScheduledCollector) CollectGetUDContractStateSizeRecords()
func (*ScheduledCollector) GetUDContractStateSizeRecords ¶
func (s *ScheduledCollector) GetUDContractStateSizeRecords() (int, int, error)
func (*ScheduledCollector) Init ¶
func (s *ScheduledCollector) Init(register prometheus.Registerer)
func (*ScheduledCollector) Start ¶
func (s *ScheduledCollector) Start()
func (*ScheduledCollector) Stop ¶
func (s *ScheduledCollector) Stop()
Click to show internal directories.
Click to hide internal directories.