Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChangeProcessor ¶
type ChangeProcessor interface {
// CaptureUpsertChange captures an upsert change to a resource.
// It panics if the resource is of unsupported type or if the passed Gateway is different from the one this
// ChangeProcessor was created for.
CaptureUpsertChange(obj client.Object)
// CaptureDeleteChange captures a delete change to a resource.
// The method panics if the resource is of unsupported type or if the passed Gateway is different from the one
// this ChangeProcessor was created for.
CaptureDeleteChange(resourceType ngftypes.ObjectType, nsname types.NamespacedName)
// Process produces a graph-like representation of GatewayAPI resources.
// If no changes were captured, the graph will be empty.
Process() (graphCfg *graph.Graph)
// GetLatestGraph returns the latest Graph.
GetLatestGraph() *graph.Graph
}
ChangeProcessor processes the changes to resources and produces a graph-like representation of the Gateway configuration. It only supports one GatewayClass resource.
type ChangeProcessorConfig ¶
type ChangeProcessorConfig struct {
// Validators validate resources according to data-plane specific rules.
Validators validation.Validators
// EventRecorder records events for Kubernetes resources.
EventRecorder record.EventRecorder
// MustExtractGVK is a function that extracts schema.GroupVersionKind from a client.Object.
MustExtractGVK kinds.MustExtractGVK
// PlusSecrets is a list of secret files used for NGINX Plus reporting (JWT, client SSL, CA).
PlusSecrets map[types.NamespacedName][]graph.PlusSecretFile
// Logger is the logger for this Change Processor.
Logger logr.Logger
// GatewayCtlrName is the name of the Gateway controller.
GatewayCtlrName string
// GatewayClassName is the name of the GatewayClass resource.
GatewayClassName string
}
ChangeProcessorConfig holds configuration parameters for ChangeProcessorImpl.
type ChangeProcessorImpl ¶
type ChangeProcessorImpl struct {
// contains filtered or unexported fields
}
ChangeProcessorImpl is an implementation of ChangeProcessor.
func NewChangeProcessorImpl ¶
func NewChangeProcessorImpl(cfg ChangeProcessorConfig) *ChangeProcessorImpl
NewChangeProcessorImpl creates a new ChangeProcessorImpl for the Gateway resource with the configured namespace name.
func (*ChangeProcessorImpl) CaptureDeleteChange ¶
func (c *ChangeProcessorImpl) CaptureDeleteChange(resourceType ngftypes.ObjectType, nsname types.NamespacedName)
func (*ChangeProcessorImpl) CaptureUpsertChange ¶
func (c *ChangeProcessorImpl) CaptureUpsertChange(obj client.Object)
func (*ChangeProcessorImpl) GetLatestGraph ¶
func (c *ChangeProcessorImpl) GetLatestGraph() *graph.Graph
func (*ChangeProcessorImpl) Process ¶
func (c *ChangeProcessorImpl) Process() *graph.Graph
type Updater ¶
type Updater interface {
Upsert(obj client.Object)
Delete(objType ngftypes.ObjectType, nsname types.NamespacedName)
}
Updater updates the cluster state.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package dataplane translates Graph representation of the cluster state into an intermediate representation of data plane configuration.
|
Package dataplane translates Graph representation of the cluster state into an intermediate representation of data plane configuration. |
|
Package graph translates the cluster state (Gateway API and Kubernetes resources) into a graph-like representation, for which: - Resources are validated.
|
Package graph translates the cluster state (Gateway API and Kubernetes resources) into a graph-like representation, for which: - Resources are validated. |
|
resolverfakes
Code generated by counterfeiter.
|
Code generated by counterfeiter. |
|
Code generated by counterfeiter.
|
Code generated by counterfeiter. |
|
validationfakes
Code generated by counterfeiter.
|
Code generated by counterfeiter. |
Click to show internal directories.
Click to hide internal directories.