iter

package
v1.11.3 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FindFlags

type FindFlags uint8
const (
	// Find subclusters that appear in the vdb.
	FindInVdb FindFlags = 1 << iota
	// Find subclusters that don't appear in the vdb.  This can be for
	// subclusters that are being deleted.
	FindNotInVdb
	// Find subclusters that currently exist.  This includes subclusters that
	// are already present in the vdb as well as ones that are scheduled for
	// deletion.  This option is mutually exclusive with the other options.
	FindExisting
	// Find will return a list of objects that are sorted by their name
	FindSorted
	// Find all subclusters, both in the vdb and not in the vdb.
	FindAll = FindInVdb | FindNotInVdb
)

type SubclusterFinder

type SubclusterFinder struct {
	client.Client
	Vdb         *vapi.VerticaDB
	Subclusters map[string]*vapi.Subcluster
}

func MakeSubclusterFinder

func MakeSubclusterFinder(cli client.Client, vdb *vapi.VerticaDB) SubclusterFinder

func (*SubclusterFinder) FindPods

func (m *SubclusterFinder) FindPods(ctx context.Context, flags FindFlags) (*corev1.PodList, error)

FindPods returns pod objects that are are used to run Vertica. It limits the pods that were created by the VerticaDB object.

func (*SubclusterFinder) FindServices

func (m *SubclusterFinder) FindServices(ctx context.Context, flags FindFlags) (*corev1.ServiceList, error)

FindServices returns service objects that are in use for subclusters

func (*SubclusterFinder) FindStatefulSets

func (m *SubclusterFinder) FindStatefulSets(ctx context.Context, flags FindFlags) (*appsv1.StatefulSetList, error)

FindStatefulSets returns the statefulsets that were created by the operator. You can limit it so that it only returns statefulsets that match subclusters in Vdb, ones that don't match or all.

func (*SubclusterFinder) FindSubclusters

func (m *SubclusterFinder) FindSubclusters(ctx context.Context, flags FindFlags) ([]*vapi.Subcluster, error)

FindSubclusters will return a list of subclusters. It accepts a flags field to indicate whether to return subclusters in the vdb, not in the vdb or both.

Jump to

Keyboard shortcuts

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