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.
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.
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.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventHandler ¶
type EventHandler interface {
// HandleEventBatch handles a batch of events.
// EventBatch can include duplicated events.
HandleEventBatch(ctx context.Context, batch events.EventBatch)
}
EventHandler handles a batch of events. Its builds a ClusterStore of k8s resources.
func NewEventHandlerImpl ¶
func NewEventHandlerImpl( clusterStore *store.ClusterStore, gateTreeConfig GateTreeConfig, haproxyCfgManagerParams haproxy.HaproxyConfMgrParams, initialStructuredConf structured.Structured, haproxyClient hapi.HAProxyClient, ) EventHandler
NewEventHandlerImpl creates a new eventHandlerImpl.
type EventLoop ¶
type EventLoop struct {
// contains filtered or unexported fields
}
func NewEventLoop ¶
func NewEventLoop( loopCfg EventLoopConfig, eventCh <-chan any, logger *slog.Logger, handler EventHandler, extractGVK utilsk8s.ExtractGVK, ) *EventLoop
NewEventLoop creates a new EventLoop.
func (*EventLoop) GetHandling ¶
func (*EventLoop) NeedLeaderElection ¶
func (*EventLoop) SetHandling ¶
type EventLoopConfig ¶
type GateTreeBuilder ¶
type GateTreeBuilder struct {
*tree.ControllerStore
// contains filtered or unexported fields
}
func NewGateTreeBuilder ¶
func NewGateTreeBuilder(controllerStore *tree.ControllerStore, cfg GateTreeConfig) GateTreeBuilder
func (*GateTreeBuilder) GetTree ¶
func (b *GateTreeBuilder) GetTree() *tree.GateTree
type GateTreeConfig ¶
type GateTreeConfig struct {
// k8sClient is a Kubernetes API client.
K8sClient client.Client
// k8sReader is a Kubernets API reader.
K8sReader client.Reader
CertificateStorage storage.CertificateStorage
MapsStorage storage.MapsStorageEx
BaseLogger *slog.Logger
LogCategoryFilterHandler *logging.CategoryFilterHandler
ExtractGVK utilsk8s.ExtractGVK
TransferHaproxyConfChannel chan diffs.HaproxyConfDiffs
// Namespace and name of the controller conf CRD
ControllerConfNsName types.NamespacedName
// ControllerName
ControllerName string
// StoreCertificatesOnDisk is a flag that indicates to the gate library to store certificates on disk
StoreCertificateOnDisk bool
// StoreMapsOnDisk is a flag that indicates to the gate library to store maps on disk
StoreMapsOnDisk bool
// RuntimeUpdateHaproxy
RuntimeUpdateHaproxy bool
// DisableIPv4 indicates whether IPv4 is disabled.
DisableIPv4 bool
// DisableIPv6 indicates whether IPv6 is disabled.
DisableIPv6 bool
}