Documentation ¶
Index ¶
Constants ¶
View Source
const ( KafkaBrokerAlive = types.BrokerStateAlive KafkaBrokerDead = types.BrokerStateDead KafkaBrokerNew = types.BrokerStateNew KafkaBrokerDemoted = types.BrokerStateDemoted KafkaBrokerBadDisks = types.BrokerStateBadDisks )
Variables ¶
This section is empty.
Functions ¶
func CruiseControlURL ¶ added in v0.21.0
func CruiseControlURLFromKafkaCluster ¶ added in v0.21.0
func CruiseControlURLFromKafkaCluster(instance *v1beta1.KafkaCluster) string
func MockNewCruiseControlScaler ¶
func MockNewCruiseControlScaler()
Types ¶
type CruiseControlScaler ¶
type CruiseControlScaler interface { IsReady() bool Status() CruiseControlStatus GetUserTasks(taskIDs ...string) ([]*Result, error) IsUp() bool AddBrokers(brokerIDs ...string) (*Result, error) RemoveBrokers(brokerIDs ...string) (*Result, error) RebalanceDisks(brokerIDs ...string) (*Result, error) BrokersWithState(states ...KafkaBrokerState) ([]string, error) PartitionReplicasByBroker() (map[string]int32, error) BrokerWithLeastPartitionReplicas() (string, error) LogDirsByBroker() (map[string]map[LogDirState][]string, error) }
func NewCruiseControlScaler ¶
func NewCruiseControlScaler(ctx context.Context, serverURL string) (CruiseControlScaler, error)
type CruiseControlStatus ¶ added in v0.21.0
type CruiseControlStatus struct { MonitorReady bool ExecutorReady bool AnalyzerReady bool ProposalReady bool GoalsReady bool MonitoredWindows float32 MonitoringCoverage float64 }
CruiseControlStatus struct is used to describe internal state of Cruise Control.
func (CruiseControlStatus) InExecution ¶ added in v0.21.0
func (s CruiseControlStatus) InExecution() bool
InExecution returns true if the Executor component of Cruise Control is performing an operation which means that new operations cannot be started until the current has finished or the forced to be terminated.
func (CruiseControlStatus) IsReady ¶ added in v0.21.0
func (s CruiseControlStatus) IsReady() bool
IsReady returns true if the Analyzer and Monitor components of Cruise Control are in ready state.
type KafkaBrokerState ¶ added in v0.21.0
type KafkaBrokerState = types.BrokerState
type LogDirState ¶ added in v0.21.0
type LogDirState int8
const ( LogDirStateOnline LogDirState = iota LogDirStateOffline )
Click to show internal directories.
Click to hide internal directories.