models

package
v0.0.0-...-79b7540 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2026 License: Apache-2.0 Imports: 6 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const RelativeJsonFileLocation = "test/data"

Variables

This section is empty.

Functions

This section is empty.

Types

type AutoThrottledTags

type AutoThrottledTags struct {
	BusyRead        int64 `json:"busy_read"`
	BusyWrite       int64 `json:"busy_write"`
	Count           int64 `json:"count"`
	RecommendedOnly int64 `json:"recommended_only"`
}

type Backup

type Backup struct {
	BlobRecentIo     *BlobRecentIo             `json:"blob_recent_io"`
	Instances        map[string]BackupInstance `json:"instances"`
	InstancesRunning int64                     `json:"instances_running"`
	LastUpdated      float64                   `json:"last_updated"`
	Paused           bool                      `json:"paused"`
	Tags             map[string]BackupTag      `json:"tags"`
	TotalWorkers     int                       `json:"total_workers"`
}

type BackupInstance

type BackupInstance struct {
	BlobStats            *BlobStats `json:"blob_stats"`
	ConfiguredWorkers    int64      `json:"configured_workers"`
	Id                   string     `json:"id"`
	LastUpdated          float64    `json:"last_updated"`
	MainThreadCpuSeconds float64    `json:"main_thread_cpu_seconds"`
	MemoryUsage          int64      `json:"memory_usage"`
	ProcessCpuSeconds    float64    `json:"process_cpu_seconds"`
	ResidentSize         int64      `json:"resident_size"`
	Version              string     `json:"version"`
}

type BackupTag

type BackupTag struct {
	CurrentContainer            string  `json:"current_container"`
	CurrentStats                string  `json:"current_status"`
	LastRestorableSecondsBehind float64 `json:"last_restorable_seconds_behind"`
	LastRestorableVersion       int64   `json:"last_restorable_version"`
	MutationLogBytesWritten     int64   `json:"mutation_log_bytes_written"`
	MutationStreamId            string  `json:"mutation_stream_id"`
	RangeBytesWritten           int64   `json:"range_bytes_written"`
	RunningBackup               bool    `json:"running_backup"`
	RunningBackupIsRestorable   bool    `json:"running_backup_is_restorable"`
}

type BlobRecentIo

type BlobRecentIo struct {
	BytesPerSecond     float64 `json:"bytes_per_second"`
	BytesSent          int64   `json:"bytes_sent"`
	RequestsFailed     int64   `json:"requests_failed"`
	RequestsSuccessful int64   `json:"requests_successful"`
}

type BlobStats

type BlobStats struct {
	Recent BlobStatsRecent `json:"recent"`
	Total  BlobStatsTotal  `json:"total"`
}

type BlobStatsRecent

type BlobStatsRecent struct {
	BytesPerSecond     float64 `json:"bytes_per_second"`
	BytesSent          int64   `json:"bytes_sent"`
	RequestsFailed     int64   `json:"requests_failed"`
	RequestsSuccessful int64   `json:"requests_successful"`
}

type BlobStatsTotal

type BlobStatsTotal struct {
	BytesSent          int64 `json:"bytes_sent"`
	RequestsFailed     int64 `json:"requests_failed"`
	RequestsSuccessful int64 `json:"requests_successful"`
}

type ClientMessage

type ClientMessage struct {
	// Possible names
	// "inconsistent_cluster_file",
	// "unreachable_cluster_controller",
	// "no_cluster_controller",
	// "status_incomplete_client",
	// "status_incomplete_coordinators",
	// "status_incomplete_error",
	// "status_incomplete_timeout",
	// "status_incomplete_cluster",
	// "quorum_not_reachable"
	Name        string
	Description string
}

type ClientStatus

type ClientStatus struct {
	ClusterFile    *ClusterFile    `json:"cluster_file"`
	Coordinators   *Coordinators   `json:"coordinators"`
	DatabaseStatus *DatabaseStatus `json:"database_status"`
	Messages       []ClientMessage `json:"messages"`
	Timestamp      int64           `json:"timestamp"`
}

Client top level status

type ClusterFile

type ClusterFile struct {
	Path     string `json:"path"`
	UpToDate bool   `json:"up_to_date"`
}

type ClusterMessage

type ClusterMessage struct {
	Description string  `json:"description"`
	Issues      []Issue `json:"issues"`
	Name        string  `json:"name"`
}

type ClusterStatus

type ClusterStatus struct {
	// TODO: add support for clients and detecting version compatibility
	// TODO: add support for incompatible connections
	ClusterControllerTimestamp int64              `json:"cluster_controller_timestamp"`
	Configuration              *Configuration     `json:"configuration"`
	ConnectionString           string             `json:"connection_string"`
	Data                       *Data              `json:"data"`
	DatabaseAvailable          bool               `json:"database_available"`
	DatabaseLockState          *LockState         `json:"database_lock_state"`
	DatacenterLag              Lag                `json:"datacenter_lag"`
	DegradedProcesses          int64              `json:"degraded_processes"`
	FaultTolerance             *FaultTolerance    `json:"fault_tolerance"`
	FullReplication            bool               `json:"full_replication"`
	Generation                 int64              `json:"generation"`
	LatencyProbe               *LatencyProbe      `json:"latency_probe"`
	Logs                       []Log              `json:"logs"`
	Machines                   map[string]Machine `json:"machines"`
	Messages                   []ClusterMessage   `json:"messages"`
	PageCache                  *PageCache         `json:"page_cache"`
	Processes                  map[string]Process `json:"processes"`
	ProtocolVersion            string             `json:"protocol_version"`
	Qos                        *Qos               `json:"qos"`
	RecoveryState              *RecoveryState     `json:"recovery_state"`
	Workload                   *Workload          `json:"workload"`
	Layers                     *Layers            `json:"layers"`
}

Cluster top level status

type Configuration

type Configuration struct {
	BackupWorkerEnabled            int64            `json:"backup_worker_enabled"`
	BlobGranulesEnabled            int64            `json:"blob_granules_enabled"`
	CommitProxies                  int64            `json:"commit_proxies"`
	CoordinatorsCount              int64            `json:"coordinators_count"`
	ExcludedServers                []ExcludedServer `json:"excluded_servers"`
	GrvProxies                     int64            `json:"grv_proxies"`
	LogRouters                     int64            `json:"log_routers"`
	Logs                           int64            `json:"logs"`
	PerpetualStorageWiggle         int64            `json:"perpetual_storage_wiggle"`
	PerpetualStorageWiggleLocality string           `json:"perpetual_storage_wiggle_locality"`
	Proxies                        int64            `json:"proxies"`
	RedundancyMode                 string           `json:"redundancy_mode"`
	RemoteLogs                     int64            `json:"remote_logs"`
	Resolvers                      int64            `json:"resolvers"`
	StorageEngine                  string           `json:"storage_engine"`
	StorageMigrationType           string           `json:"storage_migration_type"`
	TenantMode                     string           `json:"tenant_mode"`
	UsableRegions                  int64            `json:"usable_regions"`
}

type Coordinator

type Coordinator struct {
	Address   string `json:"address"`
	Protocol  string `json:"protocol"`
	Reachable bool   `json:"reachable"`
}

type Coordinators

type Coordinators struct {
	Coordinators    []Coordinator `json:"coordinators"`
	QuorumReachable bool          `json:"quorum_reachable"`
}

type Data

type Data struct {
	AveragePartitionSizeBytes             int64         `json:"average_partition_size_bytes"`
	LeastOperatingSpaceBytesLogServer     int64         `json:"least_operating_space_bytes_log_server"`
	LeastOperatingSpaceBytesStorageServer int64         `json:"least_operating_space_bytes_storage_server"`
	MovingData                            *MovingData   `json:"moving_data"`
	PartitionsCount                       int64         `json:"partitions_count"`
	State                                 *State        `json:"state"`
	SystemKvSizeBytes                     int64         `json:"system_kv_size_bytes"`
	TeamTrackers                          []TeamTracker `json:"team_trackers"`
	TotalDiskUsedBytes                    int64         `json:"total_disk_used_bytes"`
	TotalKvSizeBytes                      int64         `json:"total_kv_size_bytes"`
}

type DatabaseStatus

type DatabaseStatus struct {
	Available bool `json:"available"`
	Healthy   bool `json:"healthy"`
}

type DrBackup

type DrBackup struct {
	Instances        map[string]DrBackupInstance `json:"instances"`
	InstancesRunning int64                       `json:"instances_running"`
	LastUpdated      float64                     `json:"last_updated"`
	Paused           bool                        `json:"paused"`
	Tags             map[string]DrBackupTag      `json:"tags"`
	TotalWorkers     int64                       `json:"total_workers"`
}

type DrBackupInstance

type DrBackupInstance struct {
	ConfiguredWorkers    int64   `json:"configured_workers"`
	Id                   string  `json:"id"`
	LastUpdated          float64 `json:"last_updated"`
	MainThreadCpuSeconds float64 `json:"main_thread_cpu_seconds"`
	MemoryUsage          int64   `json:"memory_usage"`
	ProcessCpuSeconds    float64 `json:"process_cpu_seconds"`
	ResidentSize         int64   `json:"resident_size"`
	Version              string  `json:"version"`
}

type DrBackupTag

type DrBackupTag struct {
	BackupState               string  `json:"backup_state"`
	MutationLogBytesWritten   int64   `json:"mutation_log_bytes_written"`
	MutationStreamId          string  `json:"mutation_stream_id"`
	RangeBytesWritten         int64   `json:"range_bytes_written"`
	RunningBackup             bool    `json:"running_backup"`
	RunningBackupIsRestorable bool    `json:"running_backup_is_restorable"`
	SecondsBehind             float64 `json:"seconds_behind"`
}

type ExcludedServer

type ExcludedServer struct {
	Address string `json:"address"`
}

type FaultTolerance

type FaultTolerance struct {
	MaxZoneFailuresWithoutLosingAvailability int64 `json:"max_zone_failures_without_losing_availability"`
	MaxZoneFailuresWithoutLosingData         int64 `json:"max_zone_failures_without_losing_data"`
}

type FullStatus

type FullStatus struct {
	Client  *ClientStatus  `json:"client"`
	Cluster *ClusterStatus `json:"cluster"`
}

Top level fields from status json

func CheckJsonFile

func CheckJsonFile(t *testing.T, fileName string) *FullStatus

func GetStatusFromFile

func GetStatusFromFile(fileName string) (*FullStatus, error)

type GrvLatencyStats

type GrvLatencyStats struct {
	Batch   *LatencyStats `json:"batch"`
	Default *LatencyStats `json:"default"`
}

type Hz

type Hz struct {
	Hz float64 `json:"hz"`
}

type Issue

type Issue struct {
	Addresses   []string `json:"addresses"`
	Count       int64    `json:"count"`
	Description string   `json:"description"`
	Name        string   `json:"name"`
}

type Lag

type Lag struct {
	Seconds  float64 `json:"seconds"`
	Versions int64   `json:"versions"`
}

type LatencyProbe

type LatencyProbe struct {
	BatchPriorityTransactionStartSeconds     float64 `json:"batch_priority_transaction_start_seconds"`
	CommitSeconds                            float64 `json:"commit_seconds"`
	ImmediatePriorityTransactionStartSeconds float64 `json:"immediate_priority_transaction_start_seconds"`
	ReadSeconds                              float64 `json:"read_seconds"`
	TransactionStartSeconds                  float64 `json:"transaction_start_seconds"`
}

type LatencyStats

type LatencyStats struct {
	Count  int     `json:"count"`
	Max    float64 `json:"max"`
	Mean   float64 `json:"mean"`
	Median float64 `json:"median"`
	Min    float64 `json:"min"`
	P25    float64 `json:"p25"`
	P90    float64 `json:"p90"`
	P95    float64 `json:"p95"`
	P99    float64 `json:"p99"`
	P999   float64 `json:"p99.9"`
}

type Layers

type Layers struct {
	Valid        bool      `json:"_valid"`
	Backup       *Backup   `json:"backup"`
	DrBackup     *DrBackup `json:"dr_backup"`
	DrBackupDest *DrBackup `json:"dr_backup_dest"`
}

type LockState

type LockState struct {
	Locked bool `json:"locked"`
}

type Log

type Log struct {
	BeginVersion         int64          `json:"begin_version"`
	Current              bool           `json:"current"`
	Epoch                int64          `json:"epoch"`
	LogFaultTolerance    int64          `json:"log_fault_tolerance"`
	LogInterfaces        []LogInterface `json:"log_interfaces"`
	LogReplicationFactor int64          `json:"log_replication_factor"`
	LogWriteAntiQuorum   int64          `json:"log_write_anti_quorum"`
	PossiblyLosingData   bool           `json:"possibly_losing_data"`
}

type LogInterface

type LogInterface struct {
	Address string `json:"address"`
	Healthy bool   `json:"healthy"`
	Id      string `json:"id"`
}

type Machine

type Machine struct {
	Address             string           `json:"address"`
	ContributingWorkers int              `json:"contributing_workers"`
	Cpu                 *MachineCpu      `json:"cpu"`
	Excluded            bool             `json:"excluded"`
	Locality            *MachineLocality `json:"locality"`
	Memory              *MachineMemory   `json:"memory"`
	Network             *MachineNetwork  `json:"network"`
}

type MachineCpu

type MachineCpu struct {
	LogicalCoreUtilization float64 `json:"logical_core_utilization"`
}

type MachineLocality

type MachineLocality struct {
	MachineId string `json:"machineid"`
	ProcessId string `json:"processid"`
	ZoneId    string `json:"zoneid"`
}

type MachineMemory

type MachineMemory struct {
	CommittedBytes int `json:"committed_bytes"`
	FreeBytes      int `json:"free_bytes"`
	TotalBytes     int `json:"total_bytes"`
}

type MachineNetwork

type MachineNetwork struct {
	MegabitsReceived         *Hz `json:"megabits_received"`
	MegabitsSent             *Hz `json:"megabits_sent"`
	TcpSegmentsRetransmitted *Hz `json:"tcp_segments_retransmitted"`
}

type ManualThrottledTags

type ManualThrottledTags struct {
	Count int64 `json:"count"`
}

type MovingData

type MovingData struct {
	HighestPriority   int64 `json:"highest_priority"`
	InFlightBytes     int64 `json:"in_flight_bytes"`
	InQueueBytes      int64 `json:"in_queue_bytes"`
	TotalWrittenBytes int64 `json:"total_written_bytes"`
}

type PageCache

type PageCache struct {
	LogHitRate     float64 `json:"log_hit_rate"`
	StorageHitRate float64 `json:"storage_hit_rate"`
}

type PerformanceLimitedBy

type PerformanceLimitedBy struct {
	Description string `json:"description"`
	Name        string `json:"name"`
	ReasonId    int64  `json:"reason_id"`
}

type Process

type Process struct {
	Address     string           `json:"address"`
	ClassSource string           `json:"class_source"`
	ClassType   string           `json:"class_type"`
	CommandLine string           `json:"command_line"`
	Cpu         *ProcessCpu      `json:"cpu"`
	Disk        *ProcessDisk     `json:"disk"`
	Excluded    bool             `json:"excluded"`
	Degraded    bool             `json:"degraded"`
	FaultDomain string           `json:"fault_domain"`
	Locality    *ProcessLocality `json:"locality"`
	MachineId   string           `json:"machine_id"`
	Memory      *ProcessMemory   `json:"memory"`
	Messages    []ProcessMessage `json:"messages"`
	Network     *ProcessNetwork  `json:"network"`
	Roles       []ProcessRole    `json:"roles"`
	RunLoopBusy float64          `json:"run_loop_busy"`
}

type ProcessCpu

type ProcessCpu struct {
	UsageCores float64 `json:"usage_cores"`
}

type ProcessDisk

type ProcessDisk struct {
	Busy       float64             `json:"busy"`
	FreeBytes  int                 `json:"free_bytes"`
	Reads      *ProcessDiskCounter `json:"reads"`
	TotalBytes int                 `json:"total_bytes"`
	Writes     *ProcessDiskCounter `json:"writes"`
}

type ProcessDiskCounter

type ProcessDiskCounter struct {
	Counter int     `json:"counter"`
	Hz      float64 `json:"hz"`
	Sectors float64 `json:"sectors"`
}

type ProcessLocality

type ProcessLocality struct {
	InstanceId string `json:"instance_id"`
	MachineId  string `json:"machineid"`
	ProcessId  string `json:"processid"`
	Process_Id string `json:"process_id"`
	ZoneId     string `json:"zoneid"`
}

type ProcessMemory

type ProcessMemory struct {
	AvailableBytes        int `json:"available_bytes"`
	LimitBytes            int `json:"limit_bytes"`
	UnusedAllocatedMemory int `json:"unused_allocated_memory"`
	UsedBytes             int `json:"used_bytes"`
}

type ProcessMessage

type ProcessMessage struct {
	Description   string  `json:"description"`
	Name          string  `json:"name"`
	RawLogMessage string  `json:"raw_log_message"`
	Time          float64 `json:"time"`
	Type          string  `json:"type"`
}

type ProcessNetwork

type ProcessNetwork struct {
	ConnectionErrors       *Hz `json:"connection_errors"`
	ConnectionsClosed      *Hz `json:"connections_closed"`
	ConnectionsEstablished *Hz `json:"connections_established"`
	CurrentConnections     int `json:"current_connections"`
	MegabitsReceived       *Hz `json:"megabits_received"`
	MegabitsSent           *Hz `json:"megabits_sent"`
	TlsPolicyFailures      *Hz `json:"tls_policy_failures"`
}

type ProcessRole

type ProcessRole struct {
	Id   string `json:"id"`
	Role string `json:"role"`
	// GRV proxy specific
	GrvLatencyStatistics *GrvLatencyStats `json:"grv_latency_statistics"`
	// Commit Proxy specific
	CommitLatencyStatistics  *LatencyStats `json:"commit_latency_statistics"`
	CommitBatchingWindowSize *LatencyStats `json:"commit_batching_window_size"`
	// Storage and Log specific
	KvStoreAvailableBytes   int64            `json:"kvstore_available_bytes"`
	KvStoreFreeBytes        int64            `json:"kvstore_free_bytes"`
	KvStoreTotalBytes       int64            `json:"kvstore_total_bytes"`
	KvStoreUsedBytes        int64            `json:"kvstore_used_bytes"`
	QueueDiskAvailableBytes int64            `json:"queue_disk_available_bytes"`
	QueueDiskFreeBytes      int64            `json:"queue_disk_free_bytes"`
	QueueDiskTotalBytes     int64            `json:"queue_disk_total_bytes"`
	QueueDiskUsedBytes      int64            `json:"queue_disk_used_bytes"`
	DataVersion             int64            `json:"data_version"`
	DurableBytes            *WorkloadMetrics `json:"durable_bytes"`
	InputBytes              *WorkloadMetrics `json:"input_bytes"`
	// Only storage specific
	BytesQueried          *WorkloadMetrics `json:"bytes_queried"`
	DataLag               *Lag             `json:"data_lag"`
	DurabilityLag         *Lag             `json:"durability_lag"`
	DurableVersion        int64            `json:"durable_version"`
	FetchedVersions       *WorkloadMetrics `json:"fetched_versions"`
	FinishedQueries       *WorkloadMetrics `json:"finished_queries"`
	KeysQueried           *WorkloadMetrics `json:"keys_queried"`
	LocalRate             int64            `json:"local_rate"`
	LowPriorityQueries    *WorkloadMetrics `json:"low_priority_queries"`
	MutationBytes         *WorkloadMetrics `json:"mutation_bytes"`
	Mutations             *WorkloadMetrics `json:"mutations"`
	QueryQueueMax         int64            `json:"query_queue_max"`
	ReadLatencyStatistics *LatencyStats    `json:"read_latency_statistics"`
	StoredBytes           int64            `json:"stored_bytes"`
	TotalQueries          *WorkloadMetrics `json:"total_queries"`
}

type Qos

type Qos struct {
	BatchPerformanceLimitedBy          PerformanceLimitedBy `json:"batch_performance_limited_by"`
	BatchReleasedTransactionsPerSecond float64              `json:"batch_released_transactions_per_second"`
	BatchTransactionsPerSecondLimit    float64              `json:"batch_transactions_per_second_limit"`
	LimitingDataLagStorageServer       Lag                  `json:"limiting_data_lag_storage_server"`
	LimitingDurabilityLagStorageServer Lag                  `json:"limiting_durability_lag_storage_server"`
	LimitingQueueBytesStorageServer    int64                `json:"limiting_queue_bytes_storage_server"`
	PerformanceLimitedBy               PerformanceLimitedBy `json:"performance_limited_by"`
	ReleasedTransactionsPerSecond      float64              `json:"released_transactions_per_second"`
	ThrottledTags                      ThrottledTags        `json:"throttled_tags"`
	TransactionsPerSecondLimit         float64              `json:"transactions_per_second_limit"`
	WorstDataLagStorageServer          Lag                  `json:"worst_data_lag_storage_server"`
	WorstDurabilityLagStorageServer    Lag                  `json:"worst_durability_lag_storage_server"`
	WorstQueueBytesLogServer           int64                `json:"worst_queue_bytes_log_server"`
	WorstQueueBytesStorageServer       int64                `json:"worst_queue_bytes_storage_server"`
}

type RecoveryState

type RecoveryState struct {
	ActiveGenerations         int64   `json:"active_generations"`
	Description               string  `json:"description"`
	Name                      string  `json:"name"`
	SecondsSinceLastRecovered float64 `json:"seconds_since_last_recovered"`
}

type State

type State struct {
	Description          string `json:"description"`
	Healthy              bool   `json:"healthy"`
	MinReplicasRemaining int64  `json:"min_replicas_remaining"`
	Name                 string `json:"name"`
}

type TeamTracker

type TeamTracker struct {
	InFlightBytes    int64  `json:"in_flight_bytes"`
	Primary          bool   `json:"primary"`
	State            *State `json:"state"`
	UnhealthyServers int64  `json:"unhealthy_servers"`
}

type ThrottledTags

type ThrottledTags struct {
	Auto   AutoThrottledTags   `json:"auto"`
	Manual ManualThrottledTags `json:"manual"`
}

type Workload

type Workload struct {
	Bytes        *WorkloadBytes        `json:"bytes"`
	Keys         *WorkloadKeys         `json:"keys"`
	Operations   *WorkloadOperations   `json:"operations"`
	Transactions *WorkloadTransactions `json:"transactions"`
}

type WorkloadBytes

type WorkloadBytes struct {
	Read    *WorkloadMetrics `json:"read"`
	Written *WorkloadMetrics `json:"written"`
}

type WorkloadKeys

type WorkloadKeys struct {
	Read *WorkloadMetrics `json:"read"`
}

type WorkloadMetrics

type WorkloadMetrics struct {
	Counter   int64   `json:"counter"`
	Hz        float64 `json:"hz"`
	Roughness float64 `json:"roughness"`
}

type WorkloadOperations

type WorkloadOperations struct {
	LocationRequests *WorkloadMetrics `json:"location_requests"`
	LowPriorityReads *WorkloadMetrics `json:"low_priority_reads"`
	MemoryErrors     *WorkloadMetrics `json:"memory_errors"`
	ReadRequests     *WorkloadMetrics `json:"read_requests"`
	Reads            *WorkloadMetrics `json:"reads"`
	Writes           *WorkloadMetrics `json:"writes"`
}

type WorkloadTransactions

type WorkloadTransactions struct {
	Committed                *WorkloadMetrics `json:"committed"`
	Conflicted               *WorkloadMetrics `json:"conflicted"`
	RejectedForQueuedTooLong *WorkloadMetrics `json:"rejected_for_queued_too_long"`
	Started                  *WorkloadMetrics `json:"started"`
	StartedBatchPriority     *WorkloadMetrics `json:"started_batch_priority"`
	StartedDefaultPriority   *WorkloadMetrics `json:"started_default_priority"`
	StartedImmediatePriority *WorkloadMetrics `json:"started_immediate_priority"`
}

Jump to

Keyboard shortcuts

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