componenthelper

package
v1.19.1 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewComponent

func NewComponent(s *ComponentSettings) component.Component

NewComponent returns a component.Component that calls the given Start and Shutdown.

Types

type ComponentSettings

type ComponentSettings struct {
	Start
	Shutdown
}

ComponentSettings represents a settings struct to create components.

func DefaultComponentSettings

func DefaultComponentSettings() *ComponentSettings

DefaultComponentSettings returns the default settings for a component. The Start and Shutdown are no-op.

type Shutdown

type Shutdown func(context.Context) error

Shutdown specifies the function invoked when the exporter is being shutdown.

type Start

type Start func(context.Context, component.Host) error

Start specifies the function invoked when the exporter is being started.

Jump to

Keyboard shortcuts

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