common

package
v0.0.0-...-14fead7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 24, 2026 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

ValidMetaTypes contains all valid meta types

Functions

This section is empty.

Types

type MetaData

type MetaData struct {
	ClusterID string                 `json:"cluster_id"`         // cluster ID
	Type      MetaType               `json:"type"`               // metadata type (logic or sharedpool)
	Category  string                 `json:"category,omitempty"` // service category (optional)
	ModifyTS  int64                  `json:"modify_ts"`          // modification timestamp
	Metadata  map[string]interface{} `json:"metadata"`           // metadata content
}

MetaData metadata structure

type MetaType

type MetaType string

MetaType represents the type of metadata

const (
	// MetaTypeLogic represents logical cluster metadata
	MetaTypeLogic MetaType = "logic"
	// MetaTypeSharedpool represents shared pool metadata
	MetaTypeSharedpool MetaType = "sharedpool"
)

type MeteringData

type MeteringData struct {
	Timestamp    int64                    `json:"timestamp"`      // minute-level timestamp
	Category     string                   `json:"category"`       // service category identifier
	SelfID       string                   `json:"self_id"`        // component ID
	SharedPoolID string                   `json:"shared_pool_id"` // shared pool cluster ID
	Data         []map[string]interface{} `json:"data"`           // logical cluster metering data list
}

MeteringData metering data structure

type MeteringValue

type MeteringValue struct {
	Value uint64 `json:"value"` // the numeric value
	Unit  string `json:"unit"`  // the unit of measurement
}

MeteringValue represents a single metering value with its unit

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL