Documentation ¶
Overview ¶
https://pkg.go.dev/container/heap#example-package-PriorityQueue
Index ¶
- Constants
- Variables
- func BinarySearchUint16(needle uint16, haystack []uint16) bool
- func BoolToBytesLittleEndian(b bool) []byte
- func BytesToBoolLittleEndian(bytes []byte) bool
- func BytesToFloat64LittleEndian(bytes []byte) float64
- func BytesToInt16LittleEndian(bytes []byte) int16
- func BytesToInt32LittleEndian(bytes []byte) int32
- func BytesToInt64LittleEndian(bytes []byte) int64
- func BytesToUint16LittleEndian(bytes []byte) uint16
- func BytesToUint32LittleEndian(bytes []byte) uint32
- func BytesToUint64LittleEndian(bytes []byte) uint64
- func CalculateStandardVariance(values []float64) float64
- func ConvertTimestampToMillis(value string) (uint64, error)
- func CreateStreamId(indexName string, orgId uint64) string
- func CreateStreamIdForMetrics(mname *string) string
- func CreateUniqueIndentifier() string
- func DecodeGOB(raw []byte, node any) error
- func EncodeGOB(node any) ([]byte, error)
- func EpochIsSeconds(epoch uint64) bool
- func EscapeQuotes(s string) string
- func ExtractBearerToken(ctx *fasthttp.RequestCtx) (string, error)
- func ExtractParamAsString(_interface interface{}) string
- func ExtractSeriesOfJsonObjects(body []byte) ([]map[string]interface{}, error)
- func ExtractTimeStamp(raw []byte, timestampKey *string) uint64
- func Flatten(m map[string]interface{}) map[string]interface{}
- func FlattenSingleValue(key string, m map[string]interface{}, child interface{})
- func Float64ToBytesLittleEndian(val float64) []byte
- func GetAllNodesInfo(hostname string, esVersion string) map[string]*NodeInfo
- func GetCurrentTimeInMs() uint64
- func GetDecodedBody(ctx *fasthttp.RequestCtx) ([]byte, error)
- func GetMetricsTimeRange(startEpoch Epoch, endEpoch Epoch, now time.Time) (*dtypeutils.MetricsTimeRange, error)
- func GetServerStartTime() time.Time
- func GetSpecificIdentifier() (string, error)
- func HashString(x string) string
- func Int16ToBytesLittleEndian(signedval int16) []byte
- func Int32ToBytesLittleEndian(signedval int32) []byte
- func Int64ToBytesLittleEndian(signedval int64) []byte
- func IsSubWordPresent(haystack []byte, needle []byte) bool
- func IsTimeInMilli(tval uint64) bool
- func IsTimeInNano(tval uint64) bool
- func Max(x, y uint64) uint64
- func MaxInt64(x, y int64) int64
- func MergeMaps[K comparable, V any](map1, map2 map[K]V) map[K]V
- func Min(x, y uint64) uint64
- func MinInt64(x, y int64) int64
- func NearestThousandFormat(num float64) string
- func ParseAlphaNumTime(nowTs uint64, inp string, defValue uint64) uint64
- func ParseTimeForPromQL(timeParam string) (uint32, error)
- func RandomStringWithCharset(length int) string
- func ResizeSlice[T any](slice []T, newLength int) []T
- func SanitizeHistogramInterval(startEpochMs uint64, endEpochMs uint64, intervalMs uint64) (uint64, error)
- func SearchStr(needle string, haystack []string) bool
- func SelectIndicesFromSlice(slice []string, indices []int) []string
- func SelectMatchingStringsWithWildcard(s string, slice []string) []string
- func SendError(ctx *fasthttp.RequestCtx, messageToUser string, extraMessageToLog string, ...)
- func SendInternalError(ctx *fasthttp.RequestCtx, messageToUser string, extraMessageToLog string, ...)
- func SendUnauthorizedError(ctx *fasthttp.RequestCtx, messageToUser string, extraMessageToLog string, ...)
- func SetBadMsg(ctx *fasthttp.RequestCtx, msg string)
- func SetServerStartTime(startTime time.Time)
- func SliceContainsInt(slice []int, x int) bool
- func SliceContainsString(slice []string, s string) bool
- func ToFixed(num float64, precision int) float64
- func UInt64ToStringBytes(val uint64) string
- func Uint16ToBytesLittleEndian(val uint16) []byte
- func Uint32ToBytesLittleEndian(val uint32) []byte
- func Uint64ToBytesLittleEndian(val uint64) []byte
- func UnsafeByteSliceToString(haystack []byte) string
- func VerifyBasicAuth(ctx *fasthttp.RequestCtx, usernameHash uint64, passwordHash uint64) bool
- func WriteJsonResponse(ctx *fasthttp.RequestCtx, httpResp interface{})
- func WriteResponse(ctx *fasthttp.RequestCtx, httpResp HttpServerResponse)
- type AllIndicesInfoResponse
- type AllNodesInfoResponse
- type AllResponseInfo
- type AllSavedQueries
- type AutoCompleteDataInfo
- type BucketWrapper
- type BulkErrorResponse
- type BulkErrorResponseInfo
- type ClusterHealthResponseInfo
- type ClusterNode
- type ClusterNodeStr
- type ClusterStateBlocksInfo
- type ClusterStateResponseInfo
- type ClusterStatsResponseInfo
- type DeleteIndexErrorResponseInfo
- type DocIndexedResponse
- type DocIndexedResponseSubFieldGet
- type DocsResponse
- type Epoch
- type GetMasterResponse
- type GreetResponse
- type GreetVersion
- type Hits
- type HitsCount
- type HttpServerESResponse
- type HttpServerESResponseOuter
- type HttpServerESResponseScroll
- type HttpServerResponse
- type HttpServerSettingsResponse
- type IndexInfo
- type IndexNameInfoResponse
- type Item
- type LoadAverageResponseInfo
- type MemResponseInfo
- type MemberInfo
- type MetricStatsResponse
- type MetricsStatsResponseInfo
- type MgetESResponse
- type MultiNodesInfoResponse
- type MultiSearchESResponse
- type NodeInfo
- type NodeStatusEnum
- type NodeTypeEnum
- type NodesAllResponseInfo
- type NodesOSResponseInfo
- type NodesResponseInfo
- type NodesStatsIdInfo
- type NodesStatsIngestInfo
- type NodesStatsMemResponse
- type NodesStatsResponseInfo
- type NodesTransportResponseInfo
- type PriorityQueue
- type ProcessCpuResponse
- type ResultPerIndex
- type SettingsIndexInfo
- type SettingsInfo
- type ShardsItemsResponse
- type SingleESResponse
- type StatResponse
- type StoreResponse
- type SwapResponseInfo
- type TotalFsResponse
- type VirtualMemResponse
Constants ¶
const (
ContentJson = "application/json; charset=utf-8"
)
const DAY_IN_MS = 86400_000
const HOUR_IN_MS = 3600_000
const MAX_HT_BUCKETS = 90
const MIN_IN_MS = 60_000
const TEN_YEARS_IN_SECS = 315_360_000
const UINT16_MAX = 65_535
const UINT32_MAX = 4_294_967_295
const UINT8_MAX = 255
Variables ¶
var HT_STEPS = []uint64{60_000,
300_000,
600_000,
1800_000,
3600_000,
10800_000,
43200_000,
86400_000,
604800_000,
2592000_000,
7776000_000,
31536000_000,
315360000_000,
}
var MAX_SHARDS = int(1)
var UUID_GENERATOR *fastuuid.Generator
Functions ¶
func BinarySearchUint16 ¶
func BoolToBytesLittleEndian ¶
func BytesToBoolLittleEndian ¶
func CreateStreamId ¶
func CreateUniqueIndentifier ¶
func CreateUniqueIndentifier() string
func EpochIsSeconds ¶
func EscapeQuotes ¶
Converts a string like `This has "quotes"` to `This has \"quotes\"`
func ExtractBearerToken ¶
func ExtractBearerToken(ctx *fasthttp.RequestCtx) (string, error)
func ExtractParamAsString ¶
func ExtractParamAsString(_interface interface{}) string
func ExtractSeriesOfJsonObjects ¶
This takes a group of JSON objects (not inside a JSON array) and splits them into individual JSON objects.
func ExtractTimeStamp ¶
This function will extract the timestamp from the raw body. This will assume the timestamp key exists at the root level
func Flatten ¶
Flatten takes a map and returns a new one where nested maps are replaced by dot-delimited keys.
func FlattenSingleValue ¶
func GetCurrentTimeInMs ¶
func GetCurrentTimeInMs() uint64
func GetDecodedBody ¶
func GetDecodedBody(ctx *fasthttp.RequestCtx) ([]byte, error)
func GetMetricsTimeRange ¶
func GetMetricsTimeRange(startEpoch Epoch, endEpoch Epoch, now time.Time) (*dtypeutils.MetricsTimeRange, error)
func GetServerStartTime ¶
func GetSpecificIdentifier ¶
Use the MAC address as a computer-specific identifier. If it is not available, use the hostname instead.
func HashString ¶
func IsSubWordPresent ¶
we are assumung that needleLen and haystackLen are both non zero
func IsTimeInMilli ¶
func IsTimeInNano ¶
* * Check if the time value is in nano seconds * Time in Seconds: 1e9 * Time in Milli Seconds: 1e12 * Time in Micro Seconds: 1e15 * Time in Nano Seconds: 1e18
func MergeMaps ¶
func MergeMaps[K comparable, V any](map1, map2 map[K]V) map[K]V
If there are duplicate keys, values from the second map will overwrite those from the first map.
func NearestThousandFormat ¶
func ParseAlphaNumTime ¶
Supports "now-[Num][Unit]" Num ==> any positive integer Unit ==> m(minutes), h(hours), d(days)
func ParseTimeForPromQL ¶
Helper function that parses a time parameter for use in PromQL. The time parameter can be in either epoch time format or RFC3339 format. If the time parameter is an empty string, the function returns an error. The function returns the parsed time as a uint32 Unix timestamp and an error if the parsing fails.
func RandomStringWithCharset ¶
func ResizeSlice ¶
func SanitizeHistogramInterval ¶
func SanitizeHistogramInterval(startEpochMs uint64, endEpochMs uint64, intervalMs uint64) (uint64, error)
Returns the size for histogram IntervalMillis.
func SelectIndicesFromSlice ¶
func SelectMatchingStringsWithWildcard ¶
Return all strings in `slice` that match `s`, which may have wildcards.
func SendError ¶
func SendError(ctx *fasthttp.RequestCtx, messageToUser string, extraMessageToLog string, err error)
func SendInternalError ¶
func SendInternalError(ctx *fasthttp.RequestCtx, messageToUser string, extraMessageToLog string, err error)
func SendUnauthorizedError ¶
func SendUnauthorizedError(ctx *fasthttp.RequestCtx, messageToUser string, extraMessageToLog string, err error)
func SetBadMsg ¶
func SetBadMsg(ctx *fasthttp.RequestCtx, msg string)
func SetServerStartTime ¶
func SliceContainsInt ¶
func SliceContainsString ¶
func UInt64ToStringBytes ¶
func UnsafeByteSliceToString ¶
returns string using unsafe. This is zero-copy and uses unsafe
func VerifyBasicAuth ¶
func VerifyBasicAuth(ctx *fasthttp.RequestCtx, usernameHash uint64, passwordHash uint64) bool
Reads the basic authorization from the request to extract the username and password. Then hashes the username and password and compares with the expected hash values. Returns true if the hashes match. Returns false if the hashes do not match or if basic authentication credentials are not provided in the request. The provided usernameHash and passwordHash fields should be hashed with the xxhash.Sum64 algorithm. Basic authentication is defined at https://www.rfc-editor.org/rfc/rfc2617#section-2
func WriteJsonResponse ¶
func WriteJsonResponse(ctx *fasthttp.RequestCtx, httpResp interface{})
func WriteResponse ¶
func WriteResponse(ctx *fasthttp.RequestCtx, httpResp HttpServerResponse)
Types ¶
type AllIndicesInfoResponse ¶
type AllIndicesInfoResponse []IndexInfo
type AllNodesInfoResponse ¶
type AllResponseInfo ¶
type AllResponseInfo struct { Primaries map[string]interface{} `json:"primaries"` Total map[string]interface{} `json:"total"` }
func NewAllResponseInfo ¶
func NewAllResponseInfo() *AllResponseInfo
type AllSavedQueries ¶
type AutoCompleteDataInfo ¶
type AutoCompleteDataInfo struct { ColumnNames []string `json:"colNames"` MeasureFunctions []string `json:"measureFunctions"` }
func NewAutoCompleteDataInfo ¶
func NewAutoCompleteDataInfo(columnNames []string, measureFunctions []string) *AutoCompleteDataInfo
type BucketWrapper ¶
type BucketWrapper struct {
Bucket []map[string]interface{} `json:"buckets"`
}
type BulkErrorResponse ¶
type BulkErrorResponse struct {
ErrorResponse BulkErrorResponseInfo `json:"error"`
}
type BulkErrorResponseInfo ¶
func NewBulkErrorResponseInfo ¶
func NewBulkErrorResponseInfo(reason string, typ string) *BulkErrorResponseInfo
type ClusterHealthResponseInfo ¶
type ClusterHealthResponseInfo struct { ClusterName string `json:"cluster_name"` Status string `json:"status"` TimedOut bool `json:"timed_out"` NumberOfNodes int `json:"number_of_nodes"` NumberOfDataNodes int `json:"number_of_data_nodes"` ActivePrimaryShards int `json:"active_primary_shards"` ActiveShards int `json:"active_shards"` RelocatingShards int `json:"relocating_shards"` InitiliazeShards int `json:"initializing_shards"` UnassignedShards int `json:"unassigned_shards"` DelayedShards int `json:"delayed_unassigned_shards"` NumberOfPendingTasks int `json:"number_of_pending_tasks"` NumberInFlightFetch int `json:"number_of_in_flight_fetch"` TaskMaxWaiting int `json:"task_max_waiting_in_queue_millis"` ActiveShardsPercent float64 `json:"active_shards_percent_as_number"` }
func NewClusterHealthResponseInfo ¶
func NewClusterHealthResponseInfo() *ClusterHealthResponseInfo
type ClusterNode ¶
type ClusterNode struct { NodeIP string `json:"NodeIp"` RaftPort string `json:"RaftPort"` GRPCPort string `json:"GRPCPort"` NodeTypes []NodeTypeEnum `json:"NodeTypes"` NodeStatus string `json:"NodeStatus"` }
type ClusterNodeStr ¶
type ClusterStateBlocksInfo ¶
type ClusterStateBlocksInfo struct { ClusterName string `json:"cluster_name"` ClusterUUID string `json:"cluster_uuid"` Blocks map[string]interface{} `json:"blocks"` }
func NewClusterStateBlocksInfo ¶
func NewClusterStateBlocksInfo(uuidVal string) *ClusterStateBlocksInfo
type ClusterStateResponseInfo ¶
type ClusterStateResponseInfo struct { ClusterName string `json:"cluster_name"` ClusterUUID string `json:"cluster_uuid"` MasterNode string `json:"master_node"` Blocks map[string]interface{} `json:"blocks"` RoutingTable map[string]interface{} `json:"routing_table"` }
func NewClusterStateResponseInfo ¶
func NewClusterStateResponseInfo(uuidVal string, indicesResponse map[string]interface{}) *ClusterStateResponseInfo
type ClusterStatsResponseInfo ¶
type ClusterStatsResponseInfo struct { IngestionStats map[string]interface{} `json:"ingestionStats"` QueryStats map[string]interface{} `json:"queryStats"` MetricsStats map[string]interface{} `json:"metricsStats"` IndexStats []ResultPerIndex `json:"indexStats"` ChartStats map[string]map[string]interface{} `json:"chartStats"` }
type DeleteIndexErrorResponseInfo ¶
type DeleteIndexErrorResponseInfo struct { Type string `json:"type"` Reason string `json:"reason"` ResourceType string `json:"resource.type"` ResourceId string `json:"resource.id"` IndexUUID string `json:"index.uuid"` Index string `json:"index"` }
func NewDeleteIndexErrorResponseInfo ¶
func NewDeleteIndexErrorResponseInfo(indexName string) *DeleteIndexErrorResponseInfo
type DocIndexedResponse ¶
type DocIndexedResponse struct { Index string `json:"_index"` Type string `json:"_type"` Id string `json:"_id"` Version int `json:"_version"` SequenceNumber int `json:"_seq_no"` Result string `json:"result"` PrimaryTerm int `json:"_primary_term"` Shards map[string]interface{} `json:"_shards"` Get DocIndexedResponseSubFieldGet `json:"get"` }
type DocsResponse ¶
func NewDocsResponse ¶
func NewDocsResponse(evenCount int) *DocsResponse
type Epoch ¶
Should either be a unix epoch in seconds or a string like "now-1h".
func (*Epoch) UnmarshalJSON ¶
type GetMasterResponse ¶
type GetMasterResponse struct { Id string `json:"id"` Host string `json:"host"` IP string `json:"ip"` Node string `json:"node"` }
func NewGetMasterResponse ¶
func NewGetMasterResponse(id string, host string, node string) *GetMasterResponse
type GreetResponse ¶
type GreetResponse struct { Name string `json:"name"` ClusterName string `json:"cluster_name"` ClusterUUID string `json:"cluster_uuid"` Version GreetVersion `json:"version"` }
func NewGreetResponse ¶
func NewGreetResponse(host string, uuidVal string, esVersion string) GreetResponse
type GreetVersion ¶
type GreetVersion struct { Number string `json:"number"` BuildFlavour string `json:"build_flavor"` BuildType string `json:"build_type"` BuildDate string `json:"build_date"` BuildHash string `json:"build_hash"` BuildSnapshot bool `json:"build_snapshot"` LuceneVersion string `json:"lucene_version"` MinimumWireCompatibilityVersion string `json:"minimum_wire_compatibility_version"` MinimumIndexCompatibilityVersion string `json:"minimum_index_compatibility_version"` }
func NewGreetVersion ¶
func NewGreetVersion(esVersion string) GreetVersion
type HttpServerESResponse ¶
type HttpServerESResponse struct { Hits []Hits `json:"hits"` Max_score int `json:"max_score"` Total interface{} `json:"total"` }
func (*HttpServerESResponse) GetHits ¶
func (eo *HttpServerESResponse) GetHits() uint64
type HttpServerESResponseOuter ¶
type HttpServerESResponseOuter struct { Hits HttpServerESResponse `json:"hits"` Aggs map[string]BucketWrapper `json:"aggregations"` Took int64 `json:"took"` Timed_out bool `json:"timed_out"` StatusCode int `json:"status"` Shards map[string]interface{} `json:"_shards"` }
type HttpServerESResponseScroll ¶
type HttpServerESResponseScroll struct { Hits HttpServerESResponse `json:"hits"` Aggs map[string]BucketWrapper `json:"aggregations"` Took int64 `json:"took"` Timed_out bool `json:"timed_out"` StatusCode int `json:"status"` Scroll_id string `json:"_scroll_id"` }
type HttpServerResponse ¶
type IndexInfo ¶
type IndexInfo struct { Name string `json:"index"` Health string `json:"health"` Status string `json:"status"` UUID string `json:"uuid"` Rep int `json:"rep"` Pri uint64 `json:"pri"` DocsDeleted int `json:"docs.deleted"` DocsCount int `json:"docs.count"` StoreSize uint64 `json:"store.size"` OnDiskStoreSize uint64 `json:"store.onDiskBytes"` PriStoreSize uint64 `json:"pri.store.size"` }
type IndexNameInfoResponse ¶
type IndexNameInfoResponse struct { Aliases map[string]bool `json:"aliases"` Mappings map[string]interface{} `json:"mappings"` Settings SettingsInfo `json:"settings"` }
type Item ¶
type Item struct { Value string // The value of the item; arbitrary. Priority float64 // The priority of the item in the queue. // The index is needed by update and is maintained by the heap.Interface methods. Index int // The index of the item in the heap. }
Max Heap An Item is something we manage in a priority queue.
type LoadAverageResponseInfo ¶
type LoadAverageResponseInfo struct {
LoadResponse float64 `json:"1m"`
}
func NewLoadAverageResponseInfo ¶
func NewLoadAverageResponseInfo(loadAverage float64) *LoadAverageResponseInfo
type MemResponseInfo ¶
type MemResponseInfo struct { Total string `json:"total"` TotalInBytes uint64 `json:"total_in_bytes"` Free string `json:"free"` FreeInBytes uint64 `json:"free_in_bytes"` Used string `json:"used"` UsedInBytes uint64 `json:"used_in_bytes"` FreePercent uint64 `json:"free_percent"` UsedPercent uint64 `json:"used_percent"` }
type MemberInfo ¶
type MemberInfo struct { ClusterId uint64 `json:"ClusterId"` ConfigChangeId uint64 `json:"ConfigChangeId"` Nodes map[uint64]*ClusterNodeStr `json:"ClusterNode"` Observers map[uint64]string `json:"Observers"` Witnesses map[uint64]string `json:"Witnesses"` Removed map[uint64]struct{} `json:"Removed"` LeaderId uint64 `json:"LeaderId"` LeaderValid bool `json:"LeaderValid"` }
type MetricStatsResponse ¶
type MgetESResponse ¶
type MgetESResponse struct {
Docs []SingleESResponse `json:"docs"`
}
type MultiNodesInfoResponse ¶
type MultiNodesInfoResponse []*MemberInfo
type MultiSearchESResponse ¶
type MultiSearchESResponse struct {
Results []HttpServerESResponseOuter `json:"responses"`
}
type NodeInfo ¶
type NodeInfo struct { IP string `json:"ip"` BuildHash string `json:"build_hash"` TotalIndexingBuffer int64 `json:"total_indexing_buffer"` TotalIndexingBufferInBytes string `json:"total_indexing_buffer_in_bytes"` Version string `json:"version"` HttpPublishAddress string `json:"http.publish_address"` }
func NewNodeInfo ¶
type NodeStatusEnum ¶
type NodeStatusEnum int
const ( GREEN NodeStatusEnum = iota YELLOW RED UNKNOWN_NODESTATUS )
func (NodeStatusEnum) String ¶
func (s NodeStatusEnum) String() string
type NodeTypeEnum ¶
type NodeTypeEnum int
const ( INGEST NodeTypeEnum = iota QUERY SEED SEGREADER METAREADER )
func (NodeTypeEnum) String ¶
func (s NodeTypeEnum) String() string
type NodesAllResponseInfo ¶
type NodesAllResponseInfo struct { Name string `json:"name"` TransportAddress string `json:"transport_address"` HostName string `json:"host"` IP string `json:"ip"` Version string `json:"version"` BuildFlavor string `json:"build_flavor"` BuildType string `json:"build_type"` BuildHash string `json:"build_hash"` OSResponse NodesOSResponseInfo `json:"os"` }
func NewNodesAllResponseInfo ¶
func NewNodesAllResponseInfo(host string, addressPort string, version string, osResponse NodesOSResponseInfo) *NodesAllResponseInfo
type NodesOSResponseInfo ¶
type NodesOSResponseInfo struct { RefreshInterval string `json:"refresh_interval"` RefreshIntervalInMS int `json:"refresh_interval_in_millis"` Name string `json:"name"` PrettyName string `json:"pretty_name"` Arch string `json:"arch"` Version string `json:"version"` AvailableProcessors int `json:"available_processors"` AllocatedProcessors int `json:"allocated_processors"` }
func NewNodesOSResponseInfo ¶
func NewNodesOSResponseInfo() *NodesOSResponseInfo
type NodesResponseInfo ¶
type NodesResponseInfo struct { Timestamp int64 `json:"timestamp"` Name string `json:"name"` TransportAddress string `json:"transport_address"` HostName string `json:"host"` IP string `json:"ip"` OSResponse map[string]interface{} `json:"os"` JVMResponse map[string]interface{} `json:"jvm"` FSResponse map[string]interface{} `json:"fs"` ProcessResponse map[string]interface{} `json:"process"` }
type NodesStatsIdInfo ¶
type NodesStatsIdInfo struct { Timestamp int64 `json:"timestamp"` Name string `json:"name"` TransportAddress string `json:"transport_address"` Host string `json:"host"` IP string `json:"ip"` }
func NewNodesStatsIdInfo ¶
func NewNodesStatsIdInfo(timestamp int64, hostname string, addressPort string, ipAddress string) *NodesStatsIdInfo
type NodesStatsIngestInfo ¶
type NodesStatsIngestInfo struct { Name string `json:"name"` TransportAddress string `json:"transport_address"` Host string `json:"host"` IP string `json:"ip"` Version string `json:"version"` BuildFlavour string `json:"build_flavor"` BuildType string `json:"build_type"` BuildHash string `json:"build_hash"` Roles []string `json:"roles"` Ingest map[string]interface{} `json:"ingest"` }
func NewNodesStatsIngestInfo ¶
type NodesStatsMemResponse ¶
type NodesStatsMemResponse struct { HeapCommitted string `json:"heap_committed"` HeapCommittedInBytes uint64 `json:"heap_committed_in_bytes"` HeapMax string `json:"heap_max"` HeapMaxInBytes uint64 `json:"heap_max_in_bytes"` HeapUsed string `json:"heap_used"` HeapUsedInBytes uint64 `json:"heap_used_in_bytes"` HeapUsedPercent int `json:"heap_used_percent"` NonHeapCommitted string `json:"non_heap_committed"` NonHeapCommittedInBytes int `json:"non_heap_committed_in_bytes"` NonHeapUsed string `json:"non_heap_used"` NonHeapUsedInBytes int `json:"non_heap_used_bytes"` }
type NodesStatsResponseInfo ¶
type NodesStatsResponseInfo struct { Total int `json:"total"` Successful int `json:"successful"` Failed int `json:"failed"` }
func NewNodesStatsResponseInfo ¶
func NewNodesStatsResponseInfo(total int, successful int, failed int) *NodesStatsResponseInfo
type NodesTransportResponseInfo ¶
type NodesTransportResponseInfo struct { Name string `json:"name"` TransportAddress string `json:"transport_address"` HostName string `json:"host"` IP string `json:"ip"` Version string `json:"version"` BuildFlavor string `json:"build_flavor"` BuildType string `json:"build_type"` BuildHash string `json:"build_hash"` }
func NewNodesTransportResponseInfo ¶
func NewNodesTransportResponseInfo(host string, addressPort string, version string) *NodesTransportResponseInfo
type PriorityQueue ¶
type PriorityQueue []*Item
A PriorityQueue implements heap.Interface and holds Items.
func (PriorityQueue) Len ¶
func (pq PriorityQueue) Len() int
func (PriorityQueue) Less ¶
func (pq PriorityQueue) Less(i, j int) bool
func (*PriorityQueue) Pop ¶
func (pq *PriorityQueue) Pop() any
func (*PriorityQueue) Push ¶
func (pq *PriorityQueue) Push(x any)
func (PriorityQueue) Swap ¶
func (pq PriorityQueue) Swap(i, j int)
type ProcessCpuResponse ¶
type ProcessCpuResponse struct { Percent int `json:"percent"` Total string `json:"total"` TotalInMillis uint64 `json:"total_in_millis"` }
func NewProcessCpuResponse ¶
func NewProcessCpuResponse(percent int) *ProcessCpuResponse
type ResultPerIndex ¶
type SettingsIndexInfo ¶
type SettingsIndexInfo struct { NumberOfShards int `json:"number_of_shards"` NumberOfReplicas int `json:"number_of_replicas"` ProvidedName string `json:"provided_name"` }
func NewSettingsIndexInfo ¶
func NewSettingsIndexInfo(providedName string) *SettingsIndexInfo
type SettingsInfo ¶
type SettingsInfo struct {
Index SettingsIndexInfo `json:"index"`
}
type ShardsItemsResponse ¶
type ShardsItemsResponse struct { State string `json:"state"` Primary bool `json:"primary"` Node string `json:"node"` RelocatingNode *string `json:"relocating_node"` Shard int `json:"shard"` Index string `json:"index"` AllocationId map[string]interface{} `json:"allocation_id"` }
func NewShardsItemsResponse ¶
func NewShardsItemsResponse(indexName string, allocationResponse map[string]interface{}) *ShardsItemsResponse
type SingleESResponse ¶
type SingleESResponse struct { Index string `json:"_index"` Type string `json:"_type"` Id string `json:"_id"` Version int `json:"_version"` SequenceNumber int `json:"_seq_no"` Source map[string]interface{} `json:"_source"` Found bool `json:"found"` PrimaryTerm int `json:"_primary_term"` }
func NewSingleESResponse ¶
func NewSingleESResponse() *SingleESResponse
type StatResponse ¶
type StatResponse struct {
Value interface{} `json:"value"`
}
type StoreResponse ¶
type StoreResponse struct { SizeInBytes uint64 `json:"size_in_bytes"` ReservedInBytes int `json:"reservec_in_bytes"` }
func NewStoreResponse ¶
func NewStoreResponse(bytesReceivedCount uint64) *StoreResponse
type SwapResponseInfo ¶
type SwapResponseInfo struct { Total string `json:"total"` TotalInBytes int64 `json:"total_in_bytes"` Free string `json:"free"` FreeInBytes int64 `json:"free_in_bytes"` Used string `json:"used"` UsedInBytes int64 `json:"used_in_bytes"` }
func NewSwapResponseInfo ¶
func NewSwapResponseInfo() *SwapResponseInfo
type TotalFsResponse ¶
type TotalFsResponse struct { Total string `json:"total"` TotalInBytes uint64 `json:"total_in_bytes"` Free string `json:"free"` FreeInBytes uint64 `json:"free_in_bytes"` Available string `json:"available"` AvailableInBytes uint64 `json:"available_in_bytes"` }
func NewTotalFsResponse ¶
type VirtualMemResponse ¶
type VirtualMemResponse struct { TotalVirtual string `json:"total_virtual"` TotalVirtualInBytes uint64 `json:"total_virtual_in_bytes"` }
func NewVirtualMemResponse ¶
func NewVirtualMemResponse(totalVirtual string, totalVirtualBytes uint64) *VirtualMemResponse