common

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Copyright 2021.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2021.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

View Source
const (
	RouteKind              = "Route"
	OpenShiftAPIServerKind = "OpenShiftAPIServer"
)

extra kinds

View Source
const DEFAULT_RESYNC_PERIOD = 10 * time.Hour

Variables

This section is empty.

Functions

func CompareRequiredResources

func CompareRequiredResources(res1 *corev1.ResourceRequirements, res2 *corev1.ResourceRequirements) bool

func FromJson

func FromJson(jsonStr *string, obj interface{}) error

func GetManager

func GetManager() manager.Manager

func GetReconcileResyncPeriod

func GetReconcileResyncPeriod() time.Duration

func NewTrue

func NewTrue() *bool

func ResolveWatchNamespaceForManager

func ResolveWatchNamespaceForManager(oprNamespace string, watchNamespace string) (bool, []string)

Given the operator's namespace and a string representation of it's WATCH_NAMESPACE value, this method returns whether the operator is watching its own(single) namespace, or watching multiple namespaces, or all namespace For watching single: it returns (true, nil) For watching multiple: it returns (false, [n]string) where n > 0 For watching all: it returns (false, nil)

func ResourceExists

func ResourceExists(dc discovery.DiscoveryInterface, apiGroupVersion, kind string) (bool, error)

func SetManager

func SetManager(mgr manager.Manager)

func ToJson

func ToJson(obj interface{}) (string, error)

Types

type ActiveMQArtemisConfigHandler

type ActiveMQArtemisConfigHandler interface {
	IsApplicableFor(brokerNamespacedName types.NamespacedName) bool
	Config(initContainers []corev1.Container, outputDirRoot string, yacfgProfileVersion string, yacfgProfileName string) (value []string)
}

type AutoDetector

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

func NewAutoDetect

func NewAutoDetect(mgr manager.Manager) (*AutoDetector, error)

New creates a new auto-detect runner

func (*AutoDetector) DetectOpenshift

func (b *AutoDetector) DetectOpenshift() error

type StateManager

type StateManager struct {
	*sync.Mutex
	// contains filtered or unexported fields
}

func GetStateManager

func GetStateManager() *StateManager

func (*StateManager) Clear

func (sm *StateManager) Clear()

func (*StateManager) GetState

func (sm *StateManager) GetState(key string) interface{}

func (*StateManager) SetState

func (sm *StateManager) SetState(key string, value interface{})

Jump to

Keyboard shortcuts

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