federate

package
v0.9.0-m2 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2021 License: Apache-2.0 Imports: 2 Imported by: 6

Documentation

Overview

© 2020 Red Hat, Inc.

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.

© 2020 Red Hat, Inc.

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 ClusterIDLabelKey = "submariner-io/clusterID"

ClusterIDLabelKey is the key for a label that may be added to federated resources to hold the ID of the cluster from which the resource originated, allowing for filtering of resources emanating from the originating cluster.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterEventHandler

type ClusterEventHandler interface {
	// OnAdd is called when a cluster is added. The given 'kubeConfig' can be used to access
	// the cluster's kube API endpoint.
	OnAdd(clusterID string, kubeConfig *rest.Config)

	// OnUpdate is called when some aspect of a cluster's kube API endpoint configuration has changed.
	OnUpdate(clusterID string, kubeConfig *rest.Config)

	// OnRemove is called when a cluster is removed.
	OnRemove(clusterID string)
}

ClusterEventHandler handles federated cluster lifecycle event notifications.

type ClusterInformer

type ClusterInformer interface {
	// AddHandler adds a ClusterEventHandler to be notified when cluster lifecycle events occur.
	// The handler is notified asynchronously of the existing set of clusters via OnAdd events, one per cluster.
	AddHandler(handler ClusterEventHandler) error
}

ClusterInformer provides functionality to inform on federated cluster lifecycle events.

type Federator

type Federator interface {
	// Distribute distributes the given resource to all federated clusters.
	// The actual distribution may occur asynchronously in which case any returned error only indicates that the request
	// failed.
	//
	// If the resource was previously distributed and the given resource differs, each previous cluster will receive the
	// updated resource.
	Distribute(resource runtime.Object) error

	// Delete stops distributing the given resource and deletes it from all clusters to which it was distributed.
	// The actual deletion may occur asynchronously in which any returned error only indicates that the request
	// failed.
	Delete(resource runtime.Object) error
}

Federator provides methods for accessing federated resources.

func NewNoopFederator added in v0.6.3

func NewNoopFederator() Federator

Directories

Path Synopsis
© 2020 Red Hat, Inc.
© 2020 Red Hat, Inc.

Jump to

Keyboard shortcuts

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