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.

            Source Files