config

package module
v0.0.0-...-c9411c7 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Local  refScope = "local"
	Global refScope = "global"
)

Variables

This section is empty.

Functions

func CheckConfigForClusterOutput

func CheckConfigForClusterOutput(t *testing.T, output v1beta1.SyslogNGClusterOutput, expected string, opts ...OutputConfigCheckOption)

func CheckConfigForOutput

func CheckConfigForOutput(t *testing.T, output v1beta1.SyslogNGOutput, expected string, opts ...OutputConfigCheckOption)

func CheckError

func CheckError(t *testing.T, expected interface{}, actual error, msgAndArgs ...interface{})

func NewFalse

func NewFalse() *bool

func NewTrue

func NewTrue() *bool

func RenderConfigInto

func RenderConfigInto(in Input, out io.Writer) error

func Untab

func Untab(s string) string

Types

type DateParser

type DateParser struct {
	Format   string `syslog-ng:"name=format,optional"`
	Template string `syslog-ng:"name=template,optional"`
	// contains filtered or unexported fields
}

type Derefable

type Derefable[T any] interface {
	Kind() reflect.Kind
	Elem() T
}

type Field

type Field struct {
	Value reflect.Value
	Meta  reflect.StructField
}

func (Field) KeyOrEmpty

func (f Field) KeyOrEmpty() string

type Input

type Input struct {
	Name                string
	Namespace           string
	SyslogNGSpec        *v1beta1.SyslogNGSpec
	ClusterOutputs      []v1beta1.SyslogNGClusterOutput
	Outputs             []v1beta1.SyslogNGOutput
	ClusterFlows        []v1beta1.SyslogNGClusterFlow
	Flows               []v1beta1.SyslogNGFlow
	SecretLoaderFactory SecretLoaderFactory
	SourcePort          int
}

type JSONParser

type JSONParser struct {
	ExtractPrefix string `syslog-ng:"name=extract-prefix,optional"`
	Marker        string `syslog-ng:"name=marker,optional"`
	Prefix        string `syslog-ng:"name=prefix,optional"`
	Template      string `syslog-ng:"name=template,optional"`
	KeyDelimiter  string `syslog-ng:"name=key-delimiter,optional"`
	// contains filtered or unexported fields
}

type NetworkSourceDriver

type NetworkSourceDriver struct {
	Flags          []string `syslog-ng:"name=flags,optional"`
	IP             string   `syslog-ng:"name=ip,optional"`
	Port           uint16   `syslog-ng:"name=port,optional"`
	Transport      string   `syslog-ng:"name=transport,optional"`
	MaxConnections int      `syslog-ng:"name=max-connections,optional"`
	LogIWSize      int      `syslog-ng:"name=log-iw-size,optional"`
	// contains filtered or unexported fields
}

type OutputConfigCheckOption

type OutputConfigCheckOption func(options *OutputConfigCheckOptions)

type OutputConfigCheckOptions

type OutputConfigCheckOptions struct {
	ExpectedError       interface{}
	IndentWith          string
	SecretLoaderFactory SecretLoaderFactory
}

type SecretLoaderFactory

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

type SecretReader

type SecretReader struct {
	Secrets []corev1.Secret
}

func (SecretReader) Get

func (SecretReader) List

func (r SecretReader) List(ctx context.Context, list client.ObjectList, opts ...client.ListOption) error

type TestSecretLoaderFactory

type TestSecretLoaderFactory struct {
	Reader    client.Reader
	MountPath string
	Secrets   secret.MountSecrets
}

func (*TestSecretLoaderFactory) SecretLoaderForNamespace

func (f *TestSecretLoaderFactory) SecretLoaderForNamespace(ns string) secret.SecretLoader

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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