runtime

package
v0.0.0-...-6d4a0cd Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2020 License: Apache-2.0, Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

This package is NOT FOR PRODUCTION USE CASE. EXAMPLE ONLY.

Index

Constants

View Source
const CustomDisablerComponentName = "component-x"

CustomDisablerComponentName defines the component name

Variables

This section is empty.

Functions

This section is empty.

Types

type ComponentsDisablers

type ComponentsDisablers map[string]OptionalComponentDisabler

ComponentsDisablers represents type for defining components disabler list

type ComponentsListProvider

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

ComponentsListProvider provides the whole components list for creating a Kyma Runtime

func NewComponentsListProvider

func NewComponentsListProvider(managedRuntimeComponentsYAMLPath string) *ComponentsListProvider

NewComponentsListProvider returns new instance of the ComponentsListProvider

func (*ComponentsListProvider) AllComponents

func (r *ComponentsListProvider) AllComponents(kymaVersion string) ([]v1alpha1.KymaComponent, error)

AllComponents returns all components for Kyma Runtime. It fetches always the Kyma open-source components from the given url and management components from the file system and merge them together.

type CustomDisablerExample

type CustomDisablerExample struct{}

CustomDisablerExample provides example how to add functionality for disabling some which requires more complex logic

func NewCustomDisablerExample

func NewCustomDisablerExample() *CustomDisablerExample

NewCustomDisablerExample returns new instance of CustomDisablerExample

func (CustomDisablerExample) Disable

Disable disables given component by adding new overrides to existing module

type GenericComponentDisabler

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

GenericComponentDisabler provides functionality for removing configured component from given list

func NewGenericComponentDisabler

func NewGenericComponentDisabler(name string, namespace string) *GenericComponentDisabler

NewGenericComponentDisabler returns new instance of GenericComponentDisabler

func (*GenericComponentDisabler) Disable

Disable removes component form given lists. Filtering without allocating.

source: https://github.com/golang/go/wiki/SliceTricks#filtering-without-allocating

type HTTPDoer

type HTTPDoer interface {
	Do(req *http.Request) (*http.Response, error)
}

type Installation

type Installation struct {
	Kind string                    `json:"kind"`
	Spec v1alpha1.InstallationSpec `json:"spec"`
}

Installation represents the installer CR. It is copied because using directly the installer CR with such fields:

metav1.TypeMeta   `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

is not working with "gopkg.in/yaml.v2" stream decoder. On the other hand "sigs.k8s.io/yaml" does not support stream decoding.

type OptionalComponentDisabler

type OptionalComponentDisabler interface {
	Disable(components internal.ComponentConfigurationInputList) internal.ComponentConfigurationInputList
}

OptionalComponentDisabler disables component form the given list and returns modified list

type OptionalComponentsService

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

OptionalComponentsService provides functionality for executing component disablers

func NewOptionalComponentsService

func NewOptionalComponentsService(initialList ComponentsDisablers) *OptionalComponentsService

NewOptionalComponentsService returns new instance of ResourceSupervisorAggregator

func (*OptionalComponentsService) ComputeComponentsToDisable

func (f *OptionalComponentsService) ComputeComponentsToDisable(optComponentsToKeep []string) []string

ComputeComponentsToDisable returns disabler names that needs to be executed. Comparing components names as case insensitive.

func (*OptionalComponentsService) ExecuteDisablers

ExecuteDisablers executes disablers on given input and returns modified list.

BE AWARE: in current implementation the input is also modified.

func (*OptionalComponentsService) GetAllOptionalComponentsNames

func (f *OptionalComponentsService) GetAllOptionalComponentsNames() []string

GetAllOptionalComponentsNames returns list of registered components disablers names

Jump to

Keyboard shortcuts

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