runtime

package
v0.0.0-...-fb2c256 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2020 License: Apache-2.0, Apache-2.0 Imports: 22 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 ComponentDisabler

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

ComponentDisabler disables component form the given list and returns modified list

type ComponentsDisablers

type ComponentsDisablers map[string]ComponentDisabler

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 DisabledComponentsProvider

type DisabledComponentsProvider map[string]map[string]struct{}

func NewDisabledComponentsProvider

func NewDisabledComponentsProvider() DisabledComponentsProvider

func (DisabledComponentsProvider) DisabledComponentsPerPlan

func (p DisabledComponentsProvider) DisabledComponentsPerPlan(planID string) (map[string]struct{}, error)

func (DisabledComponentsProvider) DisabledForAll

func (p DisabledComponentsProvider) DisabledForAll() map[string]struct{}

type DisabledComponentsService

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

func NewDisabledComponentsService

func NewDisabledComponentsService(disabledComponents map[string]struct{}) *DisabledComponentsService

NewDisabledComponentsService returns new instance of ResourceSupervisorAggregator

func (*DisabledComponentsService) DisableComponents

DisableComponents executes disablers on given input and returns modified list.

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

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) *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 Handler

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

func NewHandler

func NewHandler(instanceDb storage.Instances, operationDb storage.Operations, defaultMaxPage int, defaultRequestRegion string) *Handler

func (*Handler) AttachRoutes

func (h *Handler) AttachRoutes(router *mux.Router)

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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