Documentation
¶
Index ¶
- Constants
- type APIEndpoint
- type APIError
- type APIRequest
- type APIResponse
- type AdminResult
- type AnalyzerState
- type AnomalyDetails
- type AnomalyDetectorState
- type AnomalyMetrics
- type AnomalyStatus
- type AnomalyType
- type BootstrapResult
- type BrokerIDAndLogDirs
- type BrokerLoadStats
- type BrokerState
- type BrokerStats
- type ClusterModelMetadata
- type ClusterModelStatistics
- type ClusterModelStatisticsData
- type ClusterModelStats
- type ConcurrencyType
- type DateTime
- type DiskStats
- type DiskUsageStat
- type ExecutionProposal
- type ExecutionTask
- type ExecutionTaskState
- type ExecutionTaskType
- type ExecutorState
- type ExecutorStateType
- type GenericRequest
- type GenericRequestWithReason
- type GenericResponse
- type Goal
- type GoalReadiness
- type GoalReadinessStatus
- type GoalStatus
- type GoalSummary
- type HostLoadStats
- type KafkaBrokerState
- type KafkaClusterState
- type KafkaClusterStats
- type KafkaPartitionState
- type LoadMonitorState
- type MeanTimeBetweenAnomaliesMs
- type ModelCompletenessRequirements
- type MonitorState
- type Operation
- type OperationStep
- type OptimizationResult
- type OptimizerResult
- type Params
- func (p Params) Add(key string, value ...string)
- func (p Params) Del(key string)
- func (p Params) Get(key string) string
- func (p Params) Has(key string) bool
- func (p Params) List() []string
- func (p Params) Merge(m Params)
- func (p Params) Set(key string, value ...string)
- func (p Params) Values(key string) []string
- type PartitionLoad
- type PartitionLoadState
- type PartitionState
- type ProgressResult
- type ProposalDataSource
- type ProvisionStatus
- type ProvisionerState
- type ReplicaMovementStrategy
- type RequestInfo
- type RequestReasoner
- type RequestStatus
- type ResourceType
- type ReviewResult
- type RightsizeResult
- type SamplingResult
- type SelfHealingEnabledRatio
- type StateResult
- type StopProposalResult
- type Substate
- type TopicPartition
- type TrainResult
- type UserTaskInfo
- type UserTaskState
- type UserTaskStatus
- type Version
Constants ¶
View Source
const ( UserTaskIDHTTPHeader = "User-Task-ID" CruiseControlVersionHTTPHeader = "Cruise-Control-Version" DateHTTPHeader = "Date" Undefined = "UNDEFINED" )
View Source
const (
DiskUsageStatDead = "DEAD"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIEndpoint ¶
type APIEndpoint string
func (APIEndpoint) MarshalJSON ¶
func (e APIEndpoint) MarshalJSON() ([]byte, error)
func (APIEndpoint) Path ¶
func (e APIEndpoint) Path() string
func (APIEndpoint) String ¶
func (e APIEndpoint) String() string
type APIError ¶
type APIError struct { // Cruise Control error StackTrace string `json:"stackTrace,omitempty"` ErrorMessage string `json:"errorMessage,omitempty"` // Servlet error Message string `json:"message,omitempty"` Servlet string `json:"servlet,omitempty"` URL string `json:"url,omitempty"` Status string `json:"status,omitempty"` }
type APIRequest ¶
type APIRequest interface {
Validate() error
}
type APIResponse ¶
type AdminResult ¶
type AdminResult struct { GenericResponse SelfHealingEnabledBefore map[AnomalyType]bool `json:"selfHealingEnabledBefore"` SelfHealingEnabledAfter map[AnomalyType]bool `json:"selfHealingEnabledAfter"` OngoingConcurrencyChangeRequest string `json:"ongoingConcurrencyChangeRequest"` DropRecentBrokersRequest string `json:"dropRecentBrokersRequest"` ConcurrencyAdjusterEnabledBefore map[string]bool `json:"concurrencyAdjusterEnabledBefore"` ConcurrencyAdjusterEnabledAfter map[string]bool `json:"concurrencyAdjusterEnabledAfter"` MinIsrBasedConcurrencyAdjustmentRequest string `json:"minIsrBasedConcurrencyAdjustmentRequest"` }
type AnalyzerState ¶
type AnalyzerState struct { IsProposalReady bool `json:"isProposalReady"` ReadyGoals []Goal `json:"readyGoals"` GoalReadiness []GoalReadiness `json:"goalReadiness,omitempty"` }
type AnomalyDetails ¶
type AnomalyDetails struct { StatusUpdateMs int64 `json:"statusUpdateMs"` DetectionMs int64 `json:"detectionMs"` Status AnomalyStatus `json:"status"` AnomalyID string `json:"anomalyId"` // It might be a separate type FixableViolatedGoals []Goal `json:"fixableViolatedGoals"` UnfixableViolatedGoals []Goal `json:"unfixableViolatedGoals"` OptimizationResult string `json:"optimizationResult"` // It might be a separate type FailedBrokersByTimeMs map[string]int64 `json:"failedBrokersByTimeMs"` FailedDisksByTimeMs map[string]int64 `json:"failedDisksByTimeMs"` Description string `json:"description"` }
type AnomalyDetectorState ¶
type AnomalyDetectorState struct { SelfHealingEnabled []AnomalyType `json:"selfHealingEnabled"` SelfHealingDisabled []AnomalyType `json:"selfHealingDisabled"` SelfHealingEnabledRatio SelfHealingEnabledRatio `json:"selfHealingEnabledRatio"` RecentGoalViolations []AnomalyDetails `json:"recentGoalViolations"` RecentBrokerFailures []AnomalyDetails `json:"recentBrokerFailures"` RecentMetricAnomalies []AnomalyDetails `json:"recentMetricAnomalies"` RecentDiskFailures []AnomalyDetails `json:"recentDiskFailures"` RecentTopicAnomalies []AnomalyDetails `json:"recentTopicAnomalies"` RecentMaintenanceEvents []AnomalyDetails `json:"recentMaintenanceEvents"` Metrics AnomalyMetrics `json:"metrics"` OngoingSelfHealingAnomaly AnomalyType `json:"ongoingSelfHealingAnomaly"` BalancednessScore float64 `json:"balancednessScore"` }
type AnomalyMetrics ¶
type AnomalyMetrics struct { MeanTimeBetweenAnomaliesMs MeanTimeBetweenAnomaliesMs `json:"meanTimeBetweenAnomaliesMs"` MeanTimeToStartFixMs float64 `json:"meanTimeToStartFixMs"` NumSelfHealingStarted int64 `json:"numSelfHealingStarted"` NumSelfHealingFailedToStart int64 `json:"numSelfHealingFailedToStart"` OngoingAnomalyDurationMs int64 `json:"ongoingAnomalyDurationMs"` }
type AnomalyStatus ¶
type AnomalyStatus int8
const ( AnomalyStatusUndefined AnomalyStatus = iota AnomalyStatusDetected AnomalyStatusIgnored AnomalyStatusFixStarted AnomalyStatusFixFailedToStart AnomalyStatusCheckWithDelay AnomalyStatusLoadMonitorNotReady AnomalyStatusCompletenessNotReady )
func (*AnomalyStatus) MarshalJSON ¶
func (g *AnomalyStatus) MarshalJSON() ([]byte, error)
func (AnomalyStatus) String ¶
func (g AnomalyStatus) String() string
func (*AnomalyStatus) UnmarshalJSON ¶
func (g *AnomalyStatus) UnmarshalJSON(data []byte) error
func (*AnomalyStatus) UnmarshalText ¶
func (g *AnomalyStatus) UnmarshalText(data []byte) error
type AnomalyType ¶
type AnomalyType int8
const ( AnomalyTypeUndefined AnomalyType = iota AnomalyTypeGoalViolation AnomalyTypeBrokerFailure AnomalyTypeMetricAnomaly AnomalyTypeDiskFailure AnomalyTypeTopicAnomaly AnomalyTypeMaintenanceEvent )
func (*AnomalyType) MarshalJSON ¶
func (g *AnomalyType) MarshalJSON() ([]byte, error)
func (AnomalyType) String ¶
func (g AnomalyType) String() string
func (*AnomalyType) UnmarshalJSON ¶
func (g *AnomalyType) UnmarshalJSON(data []byte) error
func (*AnomalyType) UnmarshalText ¶
func (g *AnomalyType) UnmarshalText(data []byte) error
type BootstrapResult ¶
type BootstrapResult struct { GenericResponse Version Message string `json:"message"` }
type BrokerIDAndLogDirs ¶
func (BrokerIDAndLogDirs) MarshalParams ¶
func (d BrokerIDAndLogDirs) MarshalParams(key string) (Params, error)
type BrokerLoadStats ¶
type BrokerLoadStats struct { FollowerNwInRate float64 `json:"FollowerNwInRate"` BrokerState BrokerState `json:"BrokerState"` Broker int32 `json:"Broker"` NwOutRate float64 `json:"NwOutRate"` NumCore float64 `json:"NumCore"` Host string `json:"Host"` CPUPct float64 `json:"CpuPct"` Replicas int32 `json:"Replicas"` NetworkInCapacity float64 `json:"NetworkInCapacity"` Rack string `json:"Rack"` Leaders int32 `json:"Leaders"` DiskCapacityMB float64 `json:"DiskCapacityMB"` DiskMB float64 `json:"DiskMB"` PnwOutRate float64 `json:"PnwOutRate"` NetworkOutCapacity float64 `json:"NetworkOutCapacity"` LeaderNwInRate float64 `json:"LeaderNwInRate"` DiskPct float64 `json:"DiskPct"` DiskState map[string]DiskStats `json:"DiskState"` }
type BrokerState ¶
type BrokerState int8
const ( BrokerStateUndefined BrokerState = iota BrokerStateAlive BrokerStateDead BrokerStateNew BrokerStateDemoted BrokerStateBadDisks )
func (BrokerState) MarshalJSON ¶
func (s BrokerState) MarshalJSON() ([]byte, error)
func (BrokerState) String ¶
func (s BrokerState) String() string
func (*BrokerState) UnmarshalJSON ¶
func (s *BrokerState) UnmarshalJSON(data []byte) error
func (*BrokerState) UnmarshalText ¶
func (s *BrokerState) UnmarshalText(data []byte) error
type BrokerStats ¶
type BrokerStats struct { Version Hosts []HostLoadStats `json:"hosts"` Brokers []BrokerLoadStats `json:"brokers"` }
type ClusterModelMetadata ¶
type ClusterModelStatistics ¶
type ClusterModelStatistics struct { Avg ClusterModelStatisticsData `json:"AVG"` Std ClusterModelStatisticsData `json:"STD"` Min ClusterModelStatisticsData `json:"MIN"` Max ClusterModelStatisticsData `json:"MAX"` }
type ClusterModelStatisticsData ¶
type ClusterModelStatisticsData struct { Disk float64 `json:"disk"` Replicas float32 `json:"replicas"` LeaderReplicas float32 `json:"leaderReplicas"` CPU float64 `json:"cpu"` NetworkOut float64 `json:"networkOutbound"` NetworkIn float64 `json:"networkInbound"` TopicReplicas float32 `json:"topicReplicas"` }
type ClusterModelStats ¶
type ClusterModelStats struct { Metadata ClusterModelMetadata `json:"metadata"` Statistics ClusterModelStatistics `json:"statistics"` }
type ConcurrencyType ¶
type ConcurrencyType int8
const ( ConcurrencyTypeUndefined ConcurrencyType = iota ConcurrencyTypeInterBrokerReplica ConcurrencyTypeLeadership ConcurrencyTypeIntraBrokerReplica )
func (*ConcurrencyType) MarshalJSON ¶
func (s *ConcurrencyType) MarshalJSON() ([]byte, error)
func (ConcurrencyType) String ¶
func (s ConcurrencyType) String() string
func (*ConcurrencyType) UnmarshalJSON ¶
func (s *ConcurrencyType) UnmarshalJSON(data []byte) error
func (*ConcurrencyType) UnmarshalText ¶
func (s *ConcurrencyType) UnmarshalText(data []byte) error
type DateTime ¶
func (*DateTime) UnmarshalJSON ¶
type DiskStats ¶
type DiskStats struct { DiskMB DiskUsageStat `json:"DiskMB"` DiskPct DiskUsageStat `json:"DiskPct"` NumLeaderReplicas int32 `json:"NumLeaderReplicas"` NumReplicas int32 `json:"NumReplicas"` }
type DiskUsageStat ¶
func (*DiskUsageStat) UnmarshalJSON ¶
func (s *DiskUsageStat) UnmarshalJSON(data []byte) error
type ExecutionProposal ¶
type ExecutionProposal struct { TopicPartition TopicPartition `json:"topicPartition"` OldLeader int32 `json:"oldLeader"` OldReplicas []int32 `json:"oldReplicas"` NewReplicas []int32 `json:"newReplicas"` }
type ExecutionTask ¶
type ExecutionTask struct { ExecutionID int64 `json:"executionId"` Type ExecutionTaskType `json:"type"` State ExecutionTaskState `json:"state"` Proposal ExecutionProposal `json:"proposal"` BrokerID int32 `json:"brokerId"` }
type ExecutionTaskState ¶
type ExecutionTaskState int8
const ( ExecutionTaskStateUndefined ExecutionTaskState = iota ExecutionTaskStatePending ExecutionTaskStateInProgress ExecutionTaskStateAborting ExecutionTaskStateAborted ExecutionTaskStateDead ExecutionTaskStateCompleted )
func (*ExecutionTaskState) MarshalJSON ¶
func (s *ExecutionTaskState) MarshalJSON() ([]byte, error)
func (ExecutionTaskState) String ¶
func (s ExecutionTaskState) String() string
func (*ExecutionTaskState) UnmarshalJSON ¶
func (s *ExecutionTaskState) UnmarshalJSON(data []byte) error
func (*ExecutionTaskState) UnmarshalText ¶
func (s *ExecutionTaskState) UnmarshalText(data []byte) error
type ExecutionTaskType ¶
type ExecutionTaskType int8
const ( ExecutionTaskTypeUndefined ExecutionTaskType = iota ExecutionTaskTypeInterBrokerReplicaAction ExecutionTaskTypeIntraBrokerReplicaAction ExecutionTaskTypeLeaderAction )
func (*ExecutionTaskType) MarshalJSON ¶
func (t *ExecutionTaskType) MarshalJSON() ([]byte, error)
func (ExecutionTaskType) String ¶
func (t ExecutionTaskType) String() string
func (*ExecutionTaskType) UnmarshalJSON ¶
func (t *ExecutionTaskType) UnmarshalJSON(data []byte) error
func (*ExecutionTaskType) UnmarshalText ¶
func (t *ExecutionTaskType) UnmarshalText(data []byte) error
type ExecutorState ¶
type ExecutorState struct { TriggeredUserTaskID string `json:"triggeredUserTaskId,omitempty"` TriggeredTaskReason string `json:"triggeredTaskReason,omitempty"` TriggeredSelfHealingTaskID string `json:"triggeredSelfHealingTaskId,omitempty"` State ExecutorStateType `json:"state"` RecentlyDemotedBrokers []int32 `json:"recentlyDemotedBrokers,omitempty"` RecentlyRemovedBrokers []int32 `json:"recentlyRemovedBrokers,omitempty"` NumTotalLeadershipMovements int32 `json:"numTotalLeadershipMovements"` NumCancelledLeadershipMovements int32 `json:"numCancelledLeadershipMovements"` NumPendingLeadershipMovements int32 `json:"numPendingLeadershipMovements"` NumFinishedLeadershipMovements int32 `json:"numFinishedLeadershipMovements"` MaximumConcurrentLeaderMovements int32 `json:"maximumConcurrentLeaderMovements,omitempty"` MinimumConcurrentLeaderMovements int32 `json:"minimumConcurrentLeaderMovements,omitempty"` AverageConcurrentLeaderMovements float64 `json:"averageConcurrentLeaderMovements,omitempty"` NumTotalPartitionMovements int32 `json:"numTotalPartitionMovements,omitempty"` NumPendingPartitionMovements int32 `json:"numPendingPartitionMovements,omitempty"` NumCancelledPartitionMovements int32 `json:"numCancelledPartitionMovements,omitempty"` NumInProgressPartitionMovements int32 `json:"numInProgressPartitionMovements,omitempty"` AbortingPartitions int32 `json:"abortingPartitions,omitempty"` NumFinishedPartitionMovements int32 `json:"numFinishedPartitionMovements,omitempty"` CancelledLeadershipMovement []ExecutionTask `json:"cancelledLeadershipMovement,omitempty"` InProgressPartitionMovement []ExecutionTask `json:"inProgressPartitionMovement,omitempty"` PendingPartitionMovement []ExecutionTask `json:"pendingPartitionMovement,omitempty"` CancelledPartitionMovement []ExecutionTask `json:"cancelledPartitionMovement,omitempty"` DeadPartitionMovement []ExecutionTask `json:"deadPartitionMovement,omitempty"` CompletedPartitionMovement []ExecutionTask `json:"completedPartitionMovement,omitempty"` AbortingPartitionMovement []ExecutionTask `json:"abortingPartitionMovement,omitempty"` AbortedPartitionMovement []ExecutionTask `json:"abortedPartitionMovement,omitempty"` FinishedDataMovement int64 `json:"finishedDataMovement,omitempty"` TotalDataToMove int64 `json:"totalDataToMove,omitempty"` MaximumConcurrentPartitionMovementsPerBroker int32 `json:"maximumConcurrentPartitionMovementsPerBroker,omitempty"` MinimumConcurrentPartitionMovementsPerBroker int32 `json:"minimumConcurrentPartitionMovementsPerBroker,omitempty"` AverageConcurrentPartitionMovementsPerBroker float64 `json:"averageConcurrentPartitionMovementsPerBroker,omitempty"` NumTotalIntraBrokerPartitionMovements int32 `json:"numTotalIntraBrokerPartitionMovements,omitempty"` NumFinishedIntraBrokerPartitionMovements int32 `json:"numFinishedIntraBrokerPartitionMovements,omitempty"` NumInProgressIntraBrokerPartitionMovements int32 `json:"numInProgressIntraBrokerPartitionMovements,omitempty"` NumAbortingIntraBrokerPartitionMovements int32 `json:"numAbortingIntraBrokerPartitionMovements,omitempty"` NumPendingIntraBrokerPartitionMovements int32 `json:"numPendingIntraBrokerPartitionMovements,omitempty"` NumCancelledIntraBrokerPartitionMovements int32 `json:"numCancelledIntraBrokerPartitionMovements,omitempty"` InProgressIntraBrokerPartitionMovement []ExecutionTask `json:"inProgressIntraBrokerPartitionMovement,omitempty"` PendingIntraBrokerPartitionMovement []ExecutionTask `json:"pendingIntraBrokerPartitionMovement,omitempty"` CancelledIntraBrokerPartitionMovement []ExecutionTask `json:"cancelledIntraBrokerPartitionMovement,omitempty"` DeadIntraBrokerPartitionMovement []ExecutionTask `json:"deadIntraBrokerPartitionMovement,omitempty"` CompletedIntraBrokerPartitionMovement []ExecutionTask `json:"completedIntraBrokerPartitionMovement,omitempty"` AbortingIntraBrokerPartitionMovement []ExecutionTask `json:"abortingIntraBrokerPartitionMovement,omitempty"` AbortedIntraBrokerPartitionMovement []ExecutionTask `json:"abortedIntraBrokerPartitionMovement,omitempty"` FinishedIntraBrokerDataMovement int64 `json:"finishedIntraBrokerDataMovement,omitempty"` TotalIntraBrokerDataToMove int64 `json:"totalIntraBrokerDataToMove,omitempty"` MaximumConcurrentIntraBrokerPartitionMovementsPerBroker int32 `json:"maximumConcurrentIntraBrokerPartitionMovementsPerBroker,omitempty"` //nolint:lll MinimumConcurrentIntraBrokerPartitionMovementsPerBroker int32 `json:"minimumConcurrentIntraBrokerPartitionMovementsPerBroker,omitempty"` //nolint:lll AverageConcurrentIntraBrokerPartitionMovementsPerBroker float64 `json:"averageConcurrentIntraBrokerPartitionMovementsPerBroker,omitempty"` //nolint:lll Error string `json:"error,omitempty"` }
type ExecutorStateType ¶
type ExecutorStateType int8
const ( ExecutorStateTypeUndefined ExecutorStateType = iota ExecutorStateTypeNoTaskInProgress ExecutorStateTypeStartingExecution ExecutorStateTypeInterBrokerReplicaMovementTaskInProgress ExecutorStateTypeIntraBrokerReplicaMovementTaskInProgress ExecutorStateTypeLeaderMovementTaskInProgress ExecutorStateTypeStoppingExecution ExecutorStateTypeInitializingProposalExecution ExecutorStateTypeGeneratingProposalsForExecution )
func (*ExecutorStateType) MarshalJSON ¶
func (t *ExecutorStateType) MarshalJSON() ([]byte, error)
func (ExecutorStateType) String ¶
func (t ExecutorStateType) String() string
func (*ExecutorStateType) UnmarshalJSON ¶
func (t *ExecutorStateType) UnmarshalJSON(data []byte) error
func (*ExecutorStateType) UnmarshalText ¶
func (t *ExecutorStateType) UnmarshalText(data []byte) error
type GenericRequest ¶
type GenericRequest struct { // Whether to return the response in JSON format or not JSON bool `param:"json,omitempty"` // Whether to return JSON schema in response header or not GetResponseSchema bool `param:"get_response_schema,omitempty"` // The user specified by a trusted proxy in that authentication model DoAs string `param:"doAs,omitempty"` }
type GenericRequestWithReason ¶
type GenericRequestWithReason struct { GenericRequest // Reason for request Reason string `param:"reason,omitempty"` }
type GenericResponse ¶
type GenericResponse struct { TaskID string CruiseControlVersion string Date string StatusCode int RequestURL string Progress *ProgressResult Error *APIError }
func (*GenericResponse) Err ¶
func (r *GenericResponse) Err() error
func (*GenericResponse) Failed ¶
func (r *GenericResponse) Failed() bool
func (*GenericResponse) InProgress ¶
func (r *GenericResponse) InProgress() bool
func (*GenericResponse) UnmarshalResponse ¶
func (r *GenericResponse) UnmarshalResponse(resp *http.Response) error
type Goal ¶
type Goal int8
const ( UndefinedGoal Goal = iota CPUCapacityGoal CPUUsageDistributionGoal DiskCapacityGoal DiskUsageDistributionGoal IntraBrokerDiskCapacityGoal IntraBrokerDiskUsageDistributionGoal LeaderBytesInDistributionGoal LeaderReplicaDistributionGoal MinTopicLeadersPerBrokerGoal NetworkInboundCapacityGoal NetworkInboundUsageDistributionGoal NetworkOutboundCapacityGoal NetworkOutboundUsageDistributionGoal PotentialNwOutGoal PreferredLeaderElectionGoal RackAwareDistributionGoal RackAwareGoal ReplicaCapacityGoal ReplicaDistributionGoal TopicReplicaDistributionGoal BrokerSetAwareGoal KafkaAssignerDiskUsageDistributionGoal KafkaAssignerEvenRackAwareGoal )
func (*Goal) MarshalJSON ¶
func (*Goal) UnmarshalJSON ¶
func (*Goal) UnmarshalText ¶
type GoalReadiness ¶
type GoalReadiness struct { Name Goal `json:"name"` Status GoalReadinessStatus `json:"status"` ModelCompleteRequirement ModelCompletenessRequirements `json:"modelCompleteRequirement"` }
type GoalReadinessStatus ¶
type GoalReadinessStatus int8
const ( GoalReadinessStatusUndefined GoalReadinessStatus = iota GoalReadinessStatusNotReady GoalReadinessStatusReady )
func (*GoalReadinessStatus) MarshalJSON ¶
func (g *GoalReadinessStatus) MarshalJSON() ([]byte, error)
func (GoalReadinessStatus) String ¶
func (g GoalReadinessStatus) String() string
func (*GoalReadinessStatus) UnmarshalJSON ¶
func (g *GoalReadinessStatus) UnmarshalJSON(data []byte) error
func (*GoalReadinessStatus) UnmarshalText ¶
func (g *GoalReadinessStatus) UnmarshalText(data []byte) error
type GoalStatus ¶
type GoalStatus int8
const ( GoalStatusUndefined GoalStatus = iota GoalStatusNoAction GoalStatusViolated GoalStatusFixed )
func (*GoalStatus) MarshalJSON ¶
func (g *GoalStatus) MarshalJSON() ([]byte, error)
func (GoalStatus) String ¶
func (g GoalStatus) String() string
func (*GoalStatus) UnmarshalJSON ¶
func (g *GoalStatus) UnmarshalJSON(data []byte) error
func (*GoalStatus) UnmarshalText ¶
func (g *GoalStatus) UnmarshalText(data []byte) error
type GoalSummary ¶
type GoalSummary struct { Goal Goal `json:"goal"` Status GoalStatus `json:"status"` ClusterModelStats ClusterModelStats `json:"clusterModelStats"` OptimizationTimeMs int64 `json:"optimizationTimeMs"` }
type HostLoadStats ¶
type HostLoadStats struct { FollowerNwInRate float64 `json:"FollowerNwInRate"` NwOutRate float64 `json:"NwOutRate"` NumCore float64 `json:"NumCore"` Host string `json:"Host"` CPUPct float64 `json:"CpuPct"` Replicas int32 `json:"Replicas"` NetworkInCapacity float64 `json:"NetworkInCapacity"` Rack string `json:"Rack"` Leaders int32 `json:"Leaders"` DiskCapacityMB float64 `json:"DiskCapacityMB"` DiskMB float64 `json:"DiskMB"` PnwOutRate float64 `json:"PnwOutRate"` NetworkOutCapacity float64 `json:"NetworkOutCapacity"` LeaderNwInRate float64 `json:"LeaderNwInRate"` DiskPct float64 `json:"DiskPct"` }
type KafkaBrokerState ¶
type KafkaBrokerState struct { LeaderCountByBrokerID map[string]int32 `json:"LeaderCountByBrokerId"` OutOfSyncCountByBrokerID map[string]int32 `json:"OutOfSyncCountByBrokerId"` ReplicaCountByBrokerID map[string]int32 `json:"ReplicaCountByBrokerId"` OfflineReplicaCountByBrokerID map[string]int32 `json:"OfflineReplicaCountByBrokerId"` IsController map[string]bool `json:"IsController"` OnlineLogDirsByBrokerID map[string][]string `json:"OnlineLogDirsByBrokerId"` OfflineLogDirsByBrokerID map[string][]string `json:"OfflineLogDirsByBrokerId"` Summary KafkaClusterStats `json:"Summary"` BrokerSetByBrokerID map[string]string `json:"BrokerSetByBrokerId"` }
type KafkaClusterState ¶
type KafkaClusterState struct { Version KafkaBrokerState KafkaBrokerState `json:"KafkaBrokerState"` KafkaPartitionState KafkaPartitionState `json:"KafkaPartitionState"` }
type KafkaClusterStats ¶
type KafkaClusterStats struct { Brokers int32 `json:"Brokers"` Topics int32 `json:"Topics"` Replicas int32 `json:"Replicas"` Leaders int32 `json:"Leaders"` AvgReplicationFactor float64 `json:"AvgReplicationFactor"` AvgReplicasPerBroker float64 `json:"AvgReplicasPerBroker"` AvgLeadersPerBroker float64 `json:"AvgLeadersPerBroker"` MaxReplicasPerBroker float64 `json:"MaxReplicasPerBroker"` MaxLeadersPerBroker float64 `json:"MaxLeadersPerBroker"` StdReplicasPerBroker float64 `json:"StdReplicasPerBroker"` StdLeadersPerBroker float64 `json:"StdLeadersPerBroker"` }
type KafkaPartitionState ¶
type KafkaPartitionState struct { Offline []PartitionState `json:"offline"` WithOfflineReplicas []PartitionState `json:"with-offline-replicas"` UnderReplicatedPartitions []PartitionState `json:"urp"` UnderMinISR []PartitionState `json:"under-min-isr"` Other []PartitionState `json:"other"` }
type LoadMonitorState ¶
type LoadMonitorState struct { BootstrapProgressPct float64 `json:"bootstrapProgressPct,omitempty"` Error string `json:"error,omitempty"` LoadingProgressPct float64 `json:"loadingProgressPct,omitempty"` MonitoredWindows map[string]float64 `json:"monitoredWindows,omitempty"` MonitoringCoveragePercentage float64 `json:"monitoringCoveragePct"` NumFlawedPartitions float32 `json:"numFlawedPartitions"` NumMonitoredWindows float32 `json:"numMonitoredWindows"` NumTotalPartitions float32 `json:"numTotalPartitions"` NumValidPartitions float32 `json:"numValidPartitions"` ReasonOfLatestPauseOrResume string `json:"reasonOfLatestPauseOrResume,omitempty"` Trained bool `json:"trained"` TrainingPercentage float64 `json:"trainingPct"` State MonitorState `json:"state"` }
type MeanTimeBetweenAnomaliesMs ¶
type MeanTimeBetweenAnomaliesMs struct { GoalViolation float64 `json:"GOAL_VIOLATION"` BrokerFailure float64 `json:"BROKER_FAILURE"` MetricAnomaly float64 `json:"METRIC_ANOMALY"` DiskFailure float64 `json:"DISK_FAILURE"` TopicAnomaly float64 `json:"TOPIC_ANOMALY"` MaintenanceEvent float64 `json:"MAINTENANCE_EVENT"` }
type MonitorState ¶
type MonitorState int8
const ( MonitorStateUndefined MonitorState = iota MonitorStateNotStarted MonitorStateRunning MonitorStatePaused MonitorStateSampling MonitorStateBootstrapping MonitorStateTraining MonitorStateLoading )
func MonitorStateFromString ¶
func MonitorStateFromString(s string) MonitorState
MonitorStateFromString converts s string to MonitorState
func (*MonitorState) MarshalJSON ¶
func (s *MonitorState) MarshalJSON() ([]byte, error)
func (MonitorState) String ¶
func (s MonitorState) String() string
func (*MonitorState) UnmarshalJSON ¶
func (s *MonitorState) UnmarshalJSON(data []byte) error
func (*MonitorState) UnmarshalText ¶
func (s *MonitorState) UnmarshalText(data []byte) error
type Operation ¶
type Operation struct { Version int32 `json:"version"` Operation string `json:"operation"` Progress []OperationStep `json:"operationProgress"` }
type OperationStep ¶
type OptimizationResult ¶
type OptimizationResult struct { Proposals []ExecutionProposal `json:"proposals"` LoadBeforeOptimization BrokerStats `json:"loadBeforeOptimization"` Summary OptimizerResult `json:"summary"` GoalSummary []GoalSummary `json:"goalSummary"` LoadAfterOptimization BrokerStats `json:"loadAfterOptimization"` Version int32 `json:"version"` }
type OptimizerResult ¶
type OptimizerResult struct { NumReplicaMovements int32 `json:"numReplicaMovements"` DataToMoveMB int64 `json:"dataToMoveMB"` NumIntraBrokerReplicaMovements int32 `json:"numIntraBrokerReplicaMovements"` IntraBrokerDataToMoveMB int64 `json:"intraBrokerDataToMoveMB"` NumLeaderMovements int32 `json:"numLeaderMovements"` RecentWindows int32 `json:"recentWindows"` MonitoredPartitionsPercentage float64 `json:"monitoredPartitionsPercentage"` ExcludedTopics []string `json:"excludedTopics"` ExcludedBrokersForReplicaMove []int32 `json:"excludedBrokersForReplicaMove"` ExcludedBrokersForLeadership []int32 `json:"excludedBrokersForLeadership"` OnDemandBalancednessScoreBefore float64 `json:"onDemandBalancednessScoreBefore"` OnDemandBalancednessScoreAfter float64 `json:"onDemandBalancednessScoreAfter"` ProvisionStatus ProvisionStatus `json:"provisionStatus"` ProvisionRecommendation string `json:"ProvisionRecommendation"` }
type PartitionLoad ¶
type PartitionLoad struct { Topic string `json:"topic"` Partition int32 `json:"partition"` Leader int32 `json:"leader"` Followers []int32 `json:"followers"` CPU float64 `json:"cpu"` NetworkIn float64 `json:"networkInbound"` NetworkOut float64 `json:"networkOutbound"` Disk float64 `json:"disk"` MessageIn float64 `json:"msg_in"` }
type PartitionLoadState ¶
type PartitionLoadState struct { Version Records []PartitionLoad `json:"records"` }
type PartitionState ¶
type PartitionState struct { Topic string `json:"topic"` Partition int32 `json:"partition"` Leader int32 `json:"leader"` Replicas []int32 `json:"replicas"` InSyncReplicas []int32 `json:"in-sync"` OutOfSyncReplicas []int32 `json:"out-of-sync"` OfflineReplicas []int32 `json:"offline"` MinISRReplicas int32 `json:"min-isr"` RemoteStorageEnabled bool `json:"remote-storage-enabled"` }
type ProgressResult ¶
type ProposalDataSource ¶
type ProposalDataSource int8
const ( ProposalDataSourceUndefined ProposalDataSource = iota ProposalDataSourceValidWindows ProposalDataSourceValidPartitions )
func (*ProposalDataSource) MarshalJSON ¶
func (s *ProposalDataSource) MarshalJSON() ([]byte, error)
func (ProposalDataSource) String ¶
func (s ProposalDataSource) String() string
func (*ProposalDataSource) UnmarshalJSON ¶
func (s *ProposalDataSource) UnmarshalJSON(data []byte) error
func (*ProposalDataSource) UnmarshalText ¶
func (s *ProposalDataSource) UnmarshalText(data []byte) error
type ProvisionStatus ¶
type ProvisionStatus int8
const ( UndefinedProvisionedStatus ProvisionStatus = iota ProvisionStatusRightSized ProvisionStatusUnderProvisioned ProvisionStatusOverProvisioned ProvisionStatusUndecided )
func (ProvisionStatus) MarshalJSON ¶
func (s ProvisionStatus) MarshalJSON() ([]byte, error)
func (ProvisionStatus) String ¶
func (s ProvisionStatus) String() string
func (*ProvisionStatus) UnmarshalJSON ¶
func (s *ProvisionStatus) UnmarshalJSON(data []byte) error
func (*ProvisionStatus) UnmarshalText ¶
func (s *ProvisionStatus) UnmarshalText(data []byte) error
type ProvisionerState ¶
type ProvisionerState int8
const ( ProvisionerStateStatusUndefined ProvisionerState = iota ProvisionerStateCompleted ProvisionerStateCompletedWithError ProvisionerStateInProgress )
func (*ProvisionerState) MarshalJSON ¶
func (s *ProvisionerState) MarshalJSON() ([]byte, error)
func (ProvisionerState) String ¶
func (s ProvisionerState) String() string
func (*ProvisionerState) UnmarshalJSON ¶
func (s *ProvisionerState) UnmarshalJSON(data []byte) error
func (*ProvisionerState) UnmarshalText ¶
func (s *ProvisionerState) UnmarshalText(data []byte) error
type ReplicaMovementStrategy ¶
type ReplicaMovementStrategy int8
const ( ReplicaMovementStrategyUndefined ReplicaMovementStrategy = iota ReplicaMovementStrategyPrioritizeLarge ReplicaMovementStrategyPostponeURP ReplicaMovementStrategyPrioritizeMinIsrWithOffline ReplicaMovementStrategyPrioritizeSmall )
func (*ReplicaMovementStrategy) MarshalJSON ¶
func (s *ReplicaMovementStrategy) MarshalJSON() ([]byte, error)
func (ReplicaMovementStrategy) String ¶
func (s ReplicaMovementStrategy) String() string
func (*ReplicaMovementStrategy) UnmarshalJSON ¶
func (s *ReplicaMovementStrategy) UnmarshalJSON(data []byte) error
func (*ReplicaMovementStrategy) UnmarshalText ¶
func (s *ReplicaMovementStrategy) UnmarshalText(data []byte) error
type RequestInfo ¶
type RequestReasoner ¶ added in v0.5.0
type RequestReasoner interface {
// contains filtered or unexported methods
}
RequestReasoner is a dummy interface to help identifying APIRequests which have the `Reason` field without the need for using reflection
type RequestStatus ¶
type RequestStatus int8
const ( RequestStatusUndefined RequestStatus = iota RequestStatusPendingReview RequestStatusApproved RequestStatusSubmitted RequestStatusDiscarded )
func (*RequestStatus) MarshalJSON ¶
func (s *RequestStatus) MarshalJSON() ([]byte, error)
func (RequestStatus) String ¶
func (s RequestStatus) String() string
func (*RequestStatus) UnmarshalJSON ¶
func (s *RequestStatus) UnmarshalJSON(data []byte) error
func (*RequestStatus) UnmarshalText ¶
func (s *RequestStatus) UnmarshalText(data []byte) error
type ResourceType ¶
type ResourceType int8
const ( ResourceTypeUndefined ResourceType = iota ResourceTypeCPU ResourceTypeDisk ResourceTypeNetworkIn ResourceTypeNetworkOut )
func (*ResourceType) MarshalJSON ¶
func (g *ResourceType) MarshalJSON() ([]byte, error)
func (ResourceType) String ¶
func (g ResourceType) String() string
func (*ResourceType) UnmarshalJSON ¶
func (g *ResourceType) UnmarshalJSON(data []byte) error
func (*ResourceType) UnmarshalText ¶
func (g *ResourceType) UnmarshalText(data []byte) error
type ReviewResult ¶
type ReviewResult struct { Version RequestInfo RequestInfo `json:"RequestInfo"` }
type RightsizeResult ¶
type RightsizeResult struct { Version NumberOfBrokersToAdd int32 `json:"numBrokersToAdd"` PartitionCount int32 `json:"partitionCount"` Topic string `json:"topic"` ProvisionerState ProvisionerState `json:"provisionerState"` }
type SamplingResult ¶
type SelfHealingEnabledRatio ¶
type SelfHealingEnabledRatio struct { GoalViolation float64 `json:"GOAL_VIOLATION"` BrokerFailure float64 `json:"BROKER_FAILURE"` MetricAnomaly float64 `json:"METRIC_ANOMALY"` DiskFailure float64 `json:"DISK_FAILURE"` TopicAnomaly float64 `json:"TOPIC_ANOMALY"` MaintenanceEvent float64 `json:"MAINTENANCE_EVENT"` }
type StateResult ¶
type StateResult struct { MonitorState LoadMonitorState `json:"MonitorState,omitempty"` ExecutorState ExecutorState `json:"ExecutorState,omitempty"` AnalyzerState AnalyzerState `json:"AnalyzerState,omitempty"` AnomalyDetectorState AnomalyDetectorState `json:"AnomalyDetectorState,omitempty"` }
type StopProposalResult ¶
type Substate ¶
type Substate int8
Substate is an enum for Cruise Control component states
func SubstateFromString ¶
SubstateFromString converts s string to Substate
func (*Substate) MarshalJSON ¶
func (*Substate) UnmarshalJSON ¶
func (*Substate) UnmarshalText ¶
type TopicPartition ¶
type TrainResult ¶
type UserTaskInfo ¶
type UserTaskState ¶
type UserTaskState struct { Version UserTasks []UserTaskInfo `json:"userTasks"` }
type UserTaskStatus ¶
type UserTaskStatus int8
const ( UserTaskStatusUndefined UserTaskStatus = iota UserTaskStatusActive UserTaskStatusInExecution UserTaskStatusCompleted UserTaskStatusCompletedWithError )
func UserTaskStatusFromString ¶
func UserTaskStatusFromString(s string) UserTaskStatus
func (*UserTaskStatus) MarshalJSON ¶
func (s *UserTaskStatus) MarshalJSON() ([]byte, error)
func (UserTaskStatus) String ¶
func (s UserTaskStatus) String() string
func (*UserTaskStatus) UnmarshalJSON ¶
func (s *UserTaskStatus) UnmarshalJSON(data []byte) error
func (*UserTaskStatus) UnmarshalText ¶
func (s *UserTaskStatus) UnmarshalText(data []byte) error
Source Files
¶
- admin_result.go
- analyzer_state.go
- anomaly.go
- anomaly_detector_state.go
- bootstrap_result.go
- broker_logdirs.go
- broker_stats.go
- cluster_model_stats.go
- common.go
- concurrency_type.go
- data_from.go
- datetime.go
- execution_proposal.go
- execution_task.go
- executor_state.go
- goal.go
- goal_readiness_status.go
- goal_status.go
- goal_summary.go
- kafka_cluster_state.go
- load_monitor_state.go
- optimization_result.go
- params.go
- partition_load_state.go
- progress_result.go
- replica_movement_strategy.go
- resource_type.go
- review_result.go
- rightsize_result.go
- sampling_result.go
- state_result.go
- stop_proposal_result.go
- substate.go
- topic_partition.go
- train_result.go
- user_task_state.go
Click to show internal directories.
Click to hide internal directories.