factories

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2026 License: Apache-2.0 Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClusterWithLabels

func NewClusterWithLabels(
	f *Factories, dbFactory db.SessionFactory, id string, labels map[string]string,
) (*api.Resource, error)

NewClusterWithLabels creates a cluster with specific labels.

func NewClusterWithObservedGeneration added in v0.2.0

func NewClusterWithObservedGeneration(
	f *Factories, dbFactory db.SessionFactory, id string,
	isAvailable, isReconciled bool, observedGeneration int32,
) (*api.Resource, error)

NewClusterWithObservedGeneration creates a cluster with a specific observed_generation on its conditions.

func NewClusterWithSpec added in v0.3.1

func NewClusterWithSpec(
	f *Factories, dbFactory db.SessionFactory, id string, spec map[string]interface{},
) (*api.Resource, error)

NewClusterWithSpec creates a cluster with a specific spec JSON value.

func NewClusterWithStatus

func NewClusterWithStatus(
	f *Factories, dbFactory db.SessionFactory, id string, isAvailable, isReconciled bool,
) (*api.Resource, error)

NewClusterWithStatus creates a cluster with specific status conditions using the current time.

func NewClusterWithStatusAndLabels

func NewClusterWithStatusAndLabels(
	f *Factories, dbFactory db.SessionFactory, id string, isAvailable, isReconciled bool, labels map[string]string,
) (*api.Resource, error)

NewClusterWithStatusAndLabels creates a cluster with both status conditions and labels.

func NewClusterWithStatusAtTime added in v0.2.0

func NewClusterWithStatusAtTime(
	f *Factories, dbFactory db.SessionFactory, id string,
	isAvailable, isReconciled bool, conditionTime time.Time,
) (*api.Resource, error)

NewClusterWithStatusAtTime creates a cluster with specific status conditions and custom timestamps.

func NewNodePoolWithLabels

func NewNodePoolWithLabels(
	f *Factories, dbFactory db.SessionFactory, id string, labels map[string]string,
) (*api.Resource, error)

NewNodePoolWithLabels creates a node pool with specific labels.

func NewNodePoolWithStatus

func NewNodePoolWithStatus(
	f *Factories, dbFactory db.SessionFactory, id string, isAvailable, isReconciled bool,
) (*api.Resource, error)

NewNodePoolWithStatus creates a node pool with specific status conditions using the current time.

func NewNodePoolWithStatusAndLabels

func NewNodePoolWithStatusAndLabels(
	f *Factories, dbFactory db.SessionFactory, id string, isAvailable, isReconciled bool, labels map[string]string,
) (*api.Resource, error)

NewNodePoolWithStatusAndLabels creates a node pool with both status conditions and labels.

func NewNodePoolWithStatusAtTime added in v0.2.0

func NewNodePoolWithStatusAtTime(
	f *Factories, dbFactory db.SessionFactory, id string,
	isAvailable, isReconciled bool, conditionTime time.Time,
) (*api.Resource, error)

NewNodePoolWithStatusAtTime creates a node pool with specific status conditions and custom timestamps.

Types

type Factories

type Factories struct {
	// contains filtered or unexported fields
}

func New added in v0.3.1

func New(resourceService services.ResourceService) Factories

func (*Factories) NewCluster

func (f *Factories) NewCluster(id string) (*api.Resource, error)

func (*Factories) NewClusterList

func (f *Factories) NewClusterList(name string, count int) ([]*api.Resource, error)

func (*Factories) NewClusters

func (f *Factories) NewClusters(id string) (*api.Resource, error)

Aliases for test compatibility

func (*Factories) NewClustersList

func (f *Factories) NewClustersList(name string, count int) ([]*api.Resource, error)

func (*Factories) NewID

func (f *Factories) NewID() string

NewID generates a new unique identifier using RFC4122 UUID v7.

func (*Factories) NewNodePool

func (f *Factories) NewNodePool(id string) (*api.Resource, error)

func (*Factories) NewNodePoolList

func (f *Factories) NewNodePoolList(name string, count int) ([]*api.Resource, error)

func (*Factories) NewNodePools

func (f *Factories) NewNodePools(id string) (*api.Resource, error)

Aliases for test compatibility

func (*Factories) NewNodePoolsList

func (f *Factories) NewNodePoolsList(name string, count int) ([]*api.Resource, error)

Jump to

Keyboard shortcuts

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