The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Fluent::LibFluentBit::Component - Base class for handle-based objects

VERSION

version 0.03

DESCRIPTION

This is a base class for the sub-objects of the FluentBit library, such as input, output, and filters. Each one is referenced by an integer rather than a pointer, and needs paired with a fluent-bit context.

ATTRIBUTES

context

Weak-reference to Fluent::LibFluentBit instance

id

An integer referring to this object within the fluent-bit context.

name

The plugin name, which is more like a "type" of the object.

METHODS

new

The constructor requires 'id' and 'context' and 'name', and creates the related library object, then passes any other attributes to the "configure" method.

configure

  $obj->configure(key1 => $value1, key2 => $value2, ...)

The fluent-bit API assigns attributes by name and value (all strings, as if they came from the config file) The attributes are written to the library, and also written to the hashref of this object for later inspection (because the library doesn't have getter functions). The fluent-bit attribute names are case-insensitive, so this method flattens them to lowercase before storing them in the Perl object. Invalid attributes generate warnings, not errors.

AUTHOR

Michael Conrad <mconrad@intellitree.com>

COPYRIGHT AND LICENSE

This software is copyright (c) 2023 by Michael Conrad.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.