resource

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2021 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 Manager

type Manager interface {
	// GetRequiredResources returns the resources initialized by the manager
	GetRequiredResources() ([]resource.KubernetesResource, error)
	// GetDeployedResources returns the resources deployed on the cluster
	GetDeployedResources() ([]resource.KubernetesResource, error)
	// GetCustomComparator returns the custom comp function used to compare two resources of a specific type
	// Returns nil if there is no custom comparator for that type
	GetCustomComparator(t reflect.Type) func(deployed resource.KubernetesResource, requested resource.KubernetesResource) bool
	// GetCustomComparators returns all custom comp functions in a map indexed by the resource type
	// Returns nil if there are none
	GetCustomComparators() map[reflect.Type]func(deployed resource.KubernetesResource, requested resource.KubernetesResource) bool
}

type Supervisor

type Supervisor interface {
	// InitManagers initializes the managers responsible for the resources life cycle
	InitManagers(nexus *v1alpha1.Nexus) error
	// GetDeployedResources will fetch for the resources managed by the nexus instance deployed in the cluster
	GetDeployedResources() (resources map[reflect.Type][]resource.KubernetesResource, err error)
	// GetRequiredResources will create the requests resources as it's supposed to be
	GetRequiredResources() (resources map[reflect.Type][]resource.KubernetesResource, err error)
	// GetComparator returns the comparator based on the active managers
	GetComparator() (compare.MapComparator, error)
}

Supervisor is the resources manager for the nexus CR. Handles the creation of every single resource needed to deploy a nexus server instance on Kubernetes

func NewSupervisor

func NewSupervisor(client client.Client) Supervisor

NewSupervisor creates a new resource manager for nexus CR

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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