replicator

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

* Copyright (c) 2022, Nadun De Silva. All Rights Reserved. * 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 (c) 2022, Nadun De Silva. All Rights Reserved. * 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 (c) 2022, Nadun De Silva. All Rights Reserved. * 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 (
	NamespaceTypeLabelKey = "replicator.nadundesilva.github.io/namespace-type"

	NamespaceTypeLabelValueManaged = "managed"
	NamespaceTypeLabelValueIgnored = "ignored"
)
View Source
const (
	ObjectTypeLabelKey = "replicator.nadundesilva.github.io/object-type"

	SourceNamespaceAnnotationKey       = "replicator.nadundesilva.github.io/source-namespace"
	SourceResourceVersionAnnotationKey = "replicator.nadundesilva.github.io/source-resource-version"

	ObjectTypeLabelValueSource  = "source"
	ObjectTypeLabelValueReplica = "replica"
)

Variables

This section is empty.

Functions

func NewController

func NewController(resourceReplicators []resources.ResourceReplicator, k8sClient kubernetes.ClientInterface, logger *zap.SugaredLogger) *controller

Types

type ResourceEventHandler

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

func NewResourcesEventHandler

func NewResourcesEventHandler(replicator resources.ResourceReplicator, k8sClient kubernetes.ClientInterface,
	logger *zap.SugaredLogger) *ResourceEventHandler

func (*ResourceEventHandler) OnAdd

func (h *ResourceEventHandler) OnAdd(newObj interface{})

func (*ResourceEventHandler) OnDelete

func (h *ResourceEventHandler) OnDelete(obj interface{})

func (*ResourceEventHandler) OnUpdate

func (h *ResourceEventHandler) OnUpdate(oldObj, newObj interface{})

Directories

Path Synopsis
* Copyright (c) 2022, Nadun De Silva.
* Copyright (c) 2022, Nadun De Silva.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳