model

package
v0.0.0-...-d5be9a4 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const LoggingRefConflict = "Other logging resources exist with the same loggingRef"

Variables

This section is empty.

Functions

func CreateSystem

func CreateSystem(resources LoggingResources, secrets SecretLoaderFactory, logger logr.Logger) (*types.System, error)

func FlowForClusterFlow

func FlowForClusterFlow(flow v1beta1.ClusterFlow, clusterOutputs ClusterOutputs, secrets SecretLoaderFactory) (*types.Flow, error)

func FlowForDefaultFlow

func FlowForDefaultFlow(logging v1beta1.Logging, clusterOutputs ClusterOutputs, secrets SecretLoaderFactory) (*types.Flow, error)

func FlowForError

func FlowForError(outputRef string, clusterOutputs ClusterOutputs, secrets SecretLoaderFactory) (*types.Flow, error)

func FlowForFlow

func FlowForFlow(flow v1beta1.Flow, clusterOutputs ClusterOutputs, outputs Outputs, secrets SecretLoaderFactory) (*types.Flow, error)

func NewValidationReconciler

func NewValidationReconciler(
	repo client.StatusClient,
	resources LoggingResources,
	secrets SecretLoaderFactory,
	logger logr.Logger,
) func(ctx context.Context) (*reconcile.Result, error)

func UniqueWatchNamespaces

func UniqueWatchNamespaces(ctx context.Context, reader client.Reader, logging *v1beta1.Logging) ([]string, error)

Types

type ClusterOutputs

type ClusterOutputs []v1beta1.ClusterOutput

func (ClusterOutputs) FindByName

func (c ClusterOutputs) FindByName(name string) *v1beta1.ClusterOutput

type FluentdLoggingResources

type FluentdLoggingResources struct {
	ClusterFlows   []v1beta1.ClusterFlow
	ClusterOutputs ClusterOutputs
	Flows          []v1beta1.Flow
	Outputs        Outputs
	Configuration  *v1beta1.FluentdConfig
	ExcessFluentds []v1beta1.FluentdConfig
}

type LoggingResourceRepository

type LoggingResourceRepository struct {
	Client client.Reader
	Logger logr.Logger
}

func NewLoggingResourceRepository

func NewLoggingResourceRepository(client client.Reader, logger logr.Logger) *LoggingResourceRepository

func (LoggingResourceRepository) ClusterFlowsFor

func (r LoggingResourceRepository) ClusterFlowsFor(ctx context.Context, logging v1beta1.Logging) ([]v1beta1.ClusterFlow, error)

func (LoggingResourceRepository) ClusterOutputsFor

func (r LoggingResourceRepository) ClusterOutputsFor(ctx context.Context, logging v1beta1.Logging) ([]v1beta1.ClusterOutput, error)

func (LoggingResourceRepository) FlowsInNamespaceFor

func (r LoggingResourceRepository) FlowsInNamespaceFor(ctx context.Context, namespace string, logging v1beta1.Logging) ([]v1beta1.Flow, error)

func (LoggingResourceRepository) FluentbitsFor

func (LoggingResourceRepository) FluentdConfigFor

func (LoggingResourceRepository) LoggingResourcesFor

func (r LoggingResourceRepository) LoggingResourcesFor(ctx context.Context, logging v1beta1.Logging) (res LoggingResources, errs error)

func (LoggingResourceRepository) LoggingRoutesFor

func (r LoggingResourceRepository) LoggingRoutesFor(ctx context.Context, logging v1beta1.Logging) ([]v1beta1.LoggingRoute, error)

func (LoggingResourceRepository) NodeAgentsFor

func (r LoggingResourceRepository) NodeAgentsFor(ctx context.Context, logging v1beta1.Logging) ([]v1beta1.NodeAgent, error)

func (LoggingResourceRepository) OutputsInNamespaceFor

func (r LoggingResourceRepository) OutputsInNamespaceFor(ctx context.Context, namespace string, logging v1beta1.Logging) ([]v1beta1.Output, error)

func (LoggingResourceRepository) SyslogNGClusterFlowsFor

func (r LoggingResourceRepository) SyslogNGClusterFlowsFor(ctx context.Context, logging v1beta1.Logging) ([]v1beta1.SyslogNGClusterFlow, error)

func (LoggingResourceRepository) SyslogNGClusterOutputsFor

func (r LoggingResourceRepository) SyslogNGClusterOutputsFor(ctx context.Context, logging v1beta1.Logging) ([]v1beta1.SyslogNGClusterOutput, error)

func (LoggingResourceRepository) SyslogNGConfigFor

func (LoggingResourceRepository) SyslogNGFlowsInNamespaceFor

func (r LoggingResourceRepository) SyslogNGFlowsInNamespaceFor(ctx context.Context, namespace string, logging v1beta1.Logging) ([]v1beta1.SyslogNGFlow, error)

func (LoggingResourceRepository) SyslogNGOutputsInNamespaceFor

func (r LoggingResourceRepository) SyslogNGOutputsInNamespaceFor(ctx context.Context, namespace string, logging v1beta1.Logging) ([]v1beta1.SyslogNGOutput, error)

type LoggingResources

type LoggingResources struct {
	AllLoggings     []v1beta1.Logging
	Logging         v1beta1.Logging
	Fluentd         FluentdLoggingResources
	SyslogNG        SyslogNGLoggingResources
	NodeAgents      []v1beta1.NodeAgent
	Fluentbits      []v1beta1.FluentbitAgent
	LoggingRoutes   []v1beta1.LoggingRoute
	WatchNamespaces []string
}

func (LoggingResources) GetFluentd

func (LoggingResources) GetSyslogNGSpec

func (l LoggingResources) GetSyslogNGSpec() (*v1beta1.SyslogNGConfig, *v1beta1.SyslogNGSpec)

type Outputs

type Outputs []v1beta1.Output

func (Outputs) FindByNamespacedName

func (c Outputs) FindByNamespacedName(namespace string, name string) *v1beta1.Output

type SecretLoaderFactory

type SecretLoaderFactory interface {
	OutputSecretLoaderForNamespace(namespace string) secret.SecretLoader
}

type SyslogNGClusterOutputs

type SyslogNGClusterOutputs []v1beta1.SyslogNGClusterOutput

func (SyslogNGClusterOutputs) FindByName

type SyslogNGLoggingResources

type SyslogNGLoggingResources struct {
	ClusterFlows    []v1beta1.SyslogNGClusterFlow
	ClusterOutputs  SyslogNGClusterOutputs
	Flows           []v1beta1.SyslogNGFlow
	Outputs         SyslogNGOutputs
	Configuration   *v1beta1.SyslogNGConfig
	ExcessSyslogNGs []v1beta1.SyslogNGConfig
}

type SyslogNGOutputs

type SyslogNGOutputs []v1beta1.SyslogNGOutput

func (SyslogNGOutputs) FindByNamespacedName

func (c SyslogNGOutputs) FindByNamespacedName(namespace string, name string) *v1beta1.SyslogNGOutput

Jump to

Keyboard shortcuts

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