store

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Copyright 2025 HAProxy Technologies LLC

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.

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.

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

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterStore

ClusterStore includes cluster resources necessary to build the Tree.

type ClusterStoreUpdater

type ClusterStoreUpdater interface {
	Upsert(obj client.Object)
	Delete(obj client.Object, nsname types.NamespacedName)
	ResetUpdates()
}

ClusterStoreUpdater updates the cluster store.

func NewClusterStoreUpdaterImpl

func NewClusterStoreUpdaterImpl(
	clusterStore *ClusterStore,
	extractGVK utilsk8s.ExtractGVK,
	logger *slog.Logger,
) ClusterStoreUpdater

type ClusterStoreUpdaterImpl

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

func (*ClusterStoreUpdaterImpl) Delete

func (cs *ClusterStoreUpdaterImpl) Delete(obj client.Object, nsname types.NamespacedName)

func (*ClusterStoreUpdaterImpl) ResetUpdates

func (cs *ClusterStoreUpdaterImpl) ResetUpdates()

func (*ClusterStoreUpdaterImpl) Upsert

func (cs *ClusterStoreUpdaterImpl) Upsert(obj client.Object)

type ClusterUpdates

ClusterUpdated contains the updates that happened to cluster objects during a sync cycle

func NewClusterUpdates

func NewClusterUpdates() ClusterUpdates

type ObjectStoreUpdater

type ObjectStoreUpdater interface {
	// contains filtered or unexported methods
}

ObjectStoreUpdater updates the cluster state.

type Status

type Status string
const (
	StatusUpserted  Status = "UPSERTED"
	StatusDeleted   Status = "DELETED"
	StatusUnchanged Status = ""
)

type Update

type Update[T client.Object] struct {
	// OldObject is the previous version of the object before any update
	// The first time we receive an update, we keep the object as it is
	// This is useful to compare the previous version with the current version
	OldObject T
	// NewObject is the new version of the object after all updated, the latest value
	NewObject T
	Status    Status
	// Indirect is set to true when the update is not direct from a K8s object but
	// from a linked K8s object update
	// For example a GatewayClass referencing a HugGate and the HugGate is updated
	Indirect bool
}

Jump to

Keyboard shortcuts

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