scaleview

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

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

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`.

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.

Jump to

Keyboard shortcuts

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