labels

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2024 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) (err error)

Process processes the data

func (*Processor) Process

func (p *Processor) Process(ctx context.Context, src models.Record) (dst models.Record, err error)

Process processes the data

Jump to

Keyboard shortcuts

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