Documentation ¶
Index ¶
- Variables
- func GetAllHubAddress() []string
- func GetAllLeaderAddress() []string
- func GetAllManagerAddress() []string
- func GetFirstHubAddress() string
- func GetFirstLeaderAddress() string
- func GetServiceAllAddress(service string) []string
- func InitByConfigFile(filePath string)
- func InitConfig()
- func InitReport()
- type BasicMessage
- type BuildVersion
- type Component
- type DailyReportMessage
- type HeartbeatMessage
- type HostInfo
- type MetricsData
- type MetricsItem
- type MetricsPoint
- type PromClient
- func (cli PromClient) HttpGet(ctx context.Context, queryUrl string, ret interface{}) error
- func (cli PromClient) Query(ctx context.Context, query string) (result PromQueryRet, err error)
- func (cli PromClient) QueryRange(ctx context.Context, query string, start, end int64, step int) (result PromQueryRangeRet, err error)
- func (cli PromClient) QueryWithJsonPath(ctx context.Context, query string, path string) (ret interface{}, err error)
- func (cli PromClient) SearchMetrics(ctx context.Context, items []PromQueryItem, start, end int64, period int) (MetricsData, error)
- type PromMatrix
- type PromPoint
- type PromQueryItem
- type PromQueryRangeRet
- type PromQueryRangeRetData
- type PromQueryRet
- type PromQueryRetData
- type PromVector
- type ServiceInfo
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ServiceHub = ServiceInfo{ ID: "Elkeid-Service-01", Name: "HUB", Description: "Elkeid High Performance Data Processing Engine", } ServiceLeader = ServiceInfo{ ID: "Elkeid-Service-02", Name: "Leader", Description: "Elkeid Hub Control Pane", } ServiceManager = ServiceInfo{ ID: "Elkeid-Service-03", Name: "Manager", Description: "Elkeid Manager for agent and service", } ServiceAC = ServiceInfo{ ID: "Elkeid-Service-04", Name: "Access", Description: "this is access", } ServiceSD = ServiceInfo{ ID: "Elkeid-Service-05", Name: "ServiceDiscovery", Description: "this is service discovery", } ServiceMongodb = ServiceInfo{ ID: "Elkeid-Service-11", Name: "MongoDB", Description: "this is mongodb", } ServiceKafka = ServiceInfo{ ID: "Elkeid-Service-12", Name: "Kafka", Description: "this is kafka", } ServiceRedis = ServiceInfo{ ID: "Elkeid-Service-13", Name: "Redis", Description: "this is redis", } ServiceES = ServiceInfo{ ID: "Elkeid-Service-14", Name: "ElasticSearch", Description: "this is elastic search", } )
View Source
var Config config.Config
Functions ¶
func GetAllHubAddress ¶
func GetAllHubAddress() []string
func GetAllLeaderAddress ¶
func GetAllLeaderAddress() []string
func GetAllManagerAddress ¶
func GetAllManagerAddress() []string
func GetFirstHubAddress ¶
func GetFirstHubAddress() string
func GetFirstLeaderAddress ¶
func GetFirstLeaderAddress() string
func GetServiceAllAddress ¶
func InitByConfigFile ¶
func InitByConfigFile(filePath string)
func InitConfig ¶
func InitConfig()
func InitReport ¶
func InitReport()
Types ¶
type BasicMessage ¶
type BuildVersion ¶
type DailyReportMessage ¶
type DailyReportMessage struct { BasicMessage ComponentVersions map[string][]BuildVersion `json:"component_versions"` Metrics map[string]interface{} `json:"metrics"` }
type HeartbeatMessage ¶
type HeartbeatMessage struct { BasicMessage Metrics map[string]interface{} `json:"metrics"` }
type MetricsData ¶
type MetricsData struct { StartTime int64 `json:"StartTime"` EndTime int64 `json:"EndTime"` Period int `json:"Period"` MetricDataResults []MetricsItem `json:"MetricDataResults"` }
type MetricsItem ¶
type MetricsItem struct { Name string `json:"Name"` DataPoints []MetricsPoint `json:"DataPoints"` }
type MetricsPoint ¶
type PromClient ¶
type PromClient struct { Address string `yaml:"address"` User string `yaml:"user"` Password string `yaml:"password"` }
var PromCli PromClient
func (PromClient) HttpGet ¶
func (cli PromClient) HttpGet(ctx context.Context, queryUrl string, ret interface{}) error
func (PromClient) Query ¶
func (cli PromClient) Query(ctx context.Context, query string) (result PromQueryRet, err error)
func (PromClient) QueryRange ¶
func (cli PromClient) QueryRange(ctx context.Context, query string, start, end int64, step int) (result PromQueryRangeRet, err error)
func (PromClient) QueryWithJsonPath ¶
func (PromClient) SearchMetrics ¶
func (cli PromClient) SearchMetrics(ctx context.Context, items []PromQueryItem, start, end int64, period int) (MetricsData, error)
type PromMatrix ¶
type PromQueryItem ¶
type PromQueryRangeRet ¶
type PromQueryRangeRet struct { Status string `json:"status"` Data PromQueryRangeRetData `json:"data"` ErrorType string `json:"errorType"` Error string `json:"error"` }
type PromQueryRangeRetData ¶
type PromQueryRangeRetData struct { ResultType string `json:"resultType"` Result []PromMatrix `json:"result"` }
type PromQueryRet ¶
type PromQueryRet struct { Status string `json:"status"` Data PromQueryRetData `json:"data"` ErrorType string `json:"errorType"` Error string `json:"error"` }
type PromQueryRetData ¶
type PromQueryRetData struct { ResultType string `json:"resultType"` Result []PromVector `json:"result"` }
type PromVector ¶
type ServiceInfo ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.