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 ScaleFactoryFn ¶ added in v0.22.0
func ScaleFactoryFn() func(ctx context.Context, kafkaCluster *v1beta1.KafkaCluster) (CruiseControlScaler, error)
Types ¶
type CruiseControlScaler ¶
type CruiseControlScaler interface { IsReady(ctx context.Context) bool Status(ctx context.Context) (CruiseControlStatus, error) UserTasks(ctx context.Context, taskIDs ...string) ([]*Result, error) IsUp(ctx context.Context) bool AddBrokers(ctx context.Context, brokerIDs ...string) (*Result, error) AddBrokersWithParams(ctx context.Context, params map[string]string) (*Result, error) RemoveBrokersWithParams(ctx context.Context, params map[string]string) (*Result, error) RebalanceWithParams(ctx context.Context, params map[string]string) (*Result, error) StopExecution(ctx context.Context) (*Result, error) RemoveBrokers(ctx context.Context, brokerIDs ...string) (*Result, error) RebalanceDisks(ctx context.Context, brokerIDs ...string) (*Result, error) BrokersWithState(ctx context.Context, states ...KafkaBrokerState) ([]string, error) KafkaClusterState(ctx context.Context) (*types.KafkaClusterState, error) PartitionReplicasByBroker(ctx context.Context) (map[string]int32, error) BrokerWithLeastPartitionReplicas(ctx context.Context) (string, error) LogDirsByBroker(ctx context.Context) (map[string]map[LogDirState][]string, error) KafkaClusterLoad(ctx context.Context) (*api.KafkaClusterLoadResponse, 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.