utils

package
v0.43.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	CPURequestAnnotation    = "rabbitmq.eventing.knative.dev/cpu-request"
	CPULimitAnnotation      = "rabbitmq.eventing.knative.dev/cpu-limit"
	MemoryRequestAnnotation = "rabbitmq.eventing.knative.dev/memory-request"
	MemoryLimitAnnotation   = "rabbitmq.eventing.knative.dev/memory-limit"
)

Variables

This section is empty.

Functions

func GetResourceRequirements added in v0.35.0

func GetResourceRequirements(obj metav1.ObjectMeta) (corev1.ResourceRequirements, error)

func NamePrefixFilterFunc

func NamePrefixFilterFunc(prefix string) func(interface{}) bool

func SetBackoffPolicy added in v0.33.0

func SetBackoffPolicy(ctx context.Context, backoffPolicy string) eventingduckv1.BackoffPolicyType

func SystemConfigMapsFilterFunc

func SystemConfigMapsFilterFunc() func(interface{}) bool

func ValidateRabbitMQClusterReference added in v0.33.0

func ValidateRabbitMQClusterReference(cref *v1beta1.RabbitmqClusterReference) *apis.FieldError

func ValidateResourceRequestsAndLimits added in v0.35.0

func ValidateResourceRequestsAndLimits(obj metav1.ObjectMeta) *apis.FieldError

func WithTimeout added in v0.32.0

func WithTimeout(duration time.Duration) cehttp.Option

Types

type EnvConfig

type EnvConfig struct {
	// MetricsConfigJson is a json string of metrics.ExporterOptions.
	// This is used to configure the metrics exporter options,
	// the config is stored in a config map inside the controllers
	// namespace and copied here.
	MetricsConfigJson string `envconfig:"K_METRICS_CONFIG" default:"{}"`

	// LoggingConfigJson is a json string of logging.Config.
	// This is used to configure the logging config, the config is stored in
	// a config map inside the controllers namespace and copied here.
	LoggingConfigJson string `envconfig:"K_LOGGING_CONFIG" default:"{}"`

	// TracingConfigJson is a json string of tracing.Config.
	// This is used to configure the tracing config, the config is stored in
	// a config map inside the controllers namespace and copied here.
	// Default is no-op.
	TracingConfigJson string `envconfig:"K_TRACING_CONFIG"`
	// contains filtered or unexported fields
}

func (*EnvConfig) GetLogger

func (e *EnvConfig) GetLogger() *zap.SugaredLogger

func (*EnvConfig) SetComponent

func (e *EnvConfig) SetComponent(component string)

func (*EnvConfig) SetupMetrics

func (e *EnvConfig) SetupMetrics(ctx context.Context) error

func (*EnvConfig) SetupTracing

func (e *EnvConfig) SetupTracing() error

Jump to

Keyboard shortcuts

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