labels

package
v0.8.9 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

README

labels

labels processor will append Asset's Labels with value from given config.

Usage

processors:
  - name: labels
    config:
      labels:
        foo: bar
        myLabel: myValue       

Inputs

Key Value Example Description
labels object {"foo": "bar"} Map of string required

Contributing

Refer to the contribution guidelines for information on contributing to this module.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Labels map[string]string `mapstructure:"labels" validate:"required"`
}

type Processor

type Processor struct {
	plugins.BasePlugin
	// contains filtered or unexported fields
}

Processor work in a list of data

func New

func New(logger log.Logger) *Processor

New create a new processor

func (*Processor) Init

func (p *Processor) Init(ctx context.Context, config plugins.Config) error

Process processes the data

func (*Processor) Process

func (p *Processor) Process(_ context.Context, src models.Record) (models.Record, error)

Process processes the data

Jump to

Keyboard shortcuts

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