objectbucket

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2022 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SubscriptionGVK = schema.GroupVersionKind{Group: "apps.open-cluster-management.io", Kind: "Subscription", Version: "v1"}

Functions

func Add

func Add(mgr manager.Manager, hubconfig *rest.Config, syncid *types.NamespacedName, syncinterval int, hub, standalone bool) error

Add does nothing for namespace subscriber, it generates cache for each of the item.

func GetDefaultSubscriber

func GetDefaultSubscriber() appv1alpha1.Subscriber

GetDefaultSubscriber - returns the defajlt namespace subscriber.

Types

type Subscriber

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

Subscriber - information to run object bucket subscription.

func CreateObjectBucketSubsriber

func CreateObjectBucketSubsriber(config *rest.Config, scheme *runtime.Scheme, mgr manager.Manager,
	kubesync SyncSource, syncinterval int) *Subscriber

CreateNamespaceSubsriber - create namespace subscriber with config to hub cluster, scheme of hub cluster and a syncrhonizer to local cluster.

func (*Subscriber) SubscribeItem

func (obs *Subscriber) SubscribeItem(subitem *appv1alpha1.SubscriberItem) error

SubscribeItem subscribes a subscriber item with namespace channel.

func (*Subscriber) UnsubscribeItem

func (obs *Subscriber) UnsubscribeItem(key types.NamespacedName) error

UnsubscribeItem uobsubscribes a namespace subscriber item.

type SubscriberItem

type SubscriberItem struct {
	appv1.SubscriberItem
	// contains filtered or unexported fields
}

SubscriberItem - defines the unit of namespace subscription.

func (*SubscriberItem) CompareOjbectStoreStatus

func (obsi *SubscriberItem) CompareOjbectStoreStatus(initObjectStoreErr error) bool

Compare current object store subscription error with the new object store initialization error.

func (*SubscriberItem) Start

func (obsi *SubscriberItem) Start(restart bool)

SubscribeItem subscribes a subscriber item with namespace channel.

func (*SubscriberItem) Stop

func (obsi *SubscriberItem) Stop()

Stop the subscriber.

type SyncSource

type SyncSource interface {
	GetInterval() int
	GetLocalClient() client.Client
	GetLocalNonCachedClient() client.Client
	GetRemoteClient() client.Client
	GetRemoteNonCachedClient() client.Client
	IsResourceNamespaced(*unstructured.Unstructured) bool
	ProcessSubResources(*appv1alpha1.Subscription, []kubesynchronizer.ResourceUnit,
		map[string]map[string]string, map[string]map[string]string, bool) error
	PurgeAllSubscribedResources(*appv1alpha1.Subscription) error
}

Jump to

Keyboard shortcuts

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