Documentation ¶
Overview ¶
Package scaleview provides utilities for operating in-memory RisingWave and RisingWaveScaleView objects. For the detailed design of RisingWaveScaleView, please refer to the RFC-0004.
Index ¶
- type RisingWaveScaleViewHelper
- func (r *RisingWaveScaleViewHelper) GetGroupIndex(group string) (int, bool)
- func (r *RisingWaveScaleViewHelper) ListComponentGroups() []string
- func (r *RisingWaveScaleViewHelper) ReadReplicas(group string) (int32, bool)
- func (r *RisingWaveScaleViewHelper) WriteReplicas(group string, replicas int32) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RisingWaveScaleViewHelper ¶
type RisingWaveScaleViewHelper struct {
// contains filtered or unexported fields
}
RisingWaveScaleViewHelper is a helper struct to help get and update the replicas in the scale view lock records.
func NewRisingWaveScaleViewHelper ¶
func NewRisingWaveScaleViewHelper(risingwave *risingwavev1alpha1.RisingWave, component string) *RisingWaveScaleViewHelper
NewRisingWaveScaleViewHelper creates a new RisingWaveScaleViewHelper.
func (*RisingWaveScaleViewHelper) GetGroupIndex ¶
func (r *RisingWaveScaleViewHelper) GetGroupIndex(group string) (int, bool)
GetGroupIndex gets the index of the given group in the list under `.spec.components.{component}.groups`.
func (*RisingWaveScaleViewHelper) ListComponentGroups ¶
func (r *RisingWaveScaleViewHelper) ListComponentGroups() []string
ListComponentGroups lists the groups under `.spec.components`. The default group "" is not included.
func (*RisingWaveScaleViewHelper) ReadReplicas ¶
func (r *RisingWaveScaleViewHelper) ReadReplicas(group string) (int32, bool)
ReadReplicas reads the replicas of the given group. It returns 0 and false if the group is not found.
func (*RisingWaveScaleViewHelper) WriteReplicas ¶
func (r *RisingWaveScaleViewHelper) WriteReplicas(group string, replicas int32) bool
WriteReplicas writes the replicas to the given group. It returns true if the group is found and the value is changed.