sinks

package
v0.0.0-...-baf22b5 Latest Latest
Warning

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

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

Documentation

Overview

Package sinks ... Copyright 2019 New Relic Corporation. All rights reserved. SPDX-License-Identifier: Apache-2.0

Package sinks ... Copyright 2019 New Relic Corporation. All rights reserved. SPDX-License-Identifier: Apache-2.0

Package sinks ... Copyright 2019 New Relic Corporation. All rights reserved. SPDX-License-Identifier: Apache-2.0

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(configs []SinkConfig, integrationVersion string) (map[string]Sink, error)

Create takes a slice of SinkConfigs and attempts to initialize the sink handlers.

Types

type Sink

type Sink interface {
	HandleEvent(kubeEvent common.KubeEvent) error
	HandleObject(kubeObject common.KubeObject) error
}

Sink receives events from the router, process and publish them to a certain destination (stdout, NewRelic platform, etc.).

type SinkConfig

type SinkConfig struct {
	Name   string
	Config map[string]string
}

SinkConfig defines the name and config map of an `Sink`

func (SinkConfig) GetDurationOr

func (s SinkConfig) GetDurationOr(name string, fallback time.Duration) time.Duration

GetDurationOr returns the duration variable by the given name. It will return the fallback in case the duration is not found. Invalid durations in configuration are not accepted.

func (SinkConfig) MustGetString

func (s SinkConfig) MustGetString(name string) string

MustGetString returns the string variable by the given name. If it's not present, an error will given and the application will stop.

Jump to

Keyboard shortcuts

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