Rainer Gerhards b326c76f45 style: normalize C source formatting via clang-format (PoC)
This commit applies the new canonical formatting style using `clang-format` with custom settings (notably 4-space indentation), as part of our shift toward automated formatting normalization.

⚠️ No functional changes are included — only whitespace and layout modifications as produced by `clang-format`.

This change is part of the formatting modernization strategy discussed in:
https://github.com/rsyslog/rsyslog/issues/5747

Key context:
- Formatting is now treated as a disposable view, normalized via tooling.
- The `.clang-format` file defines the canonical style.
- A fixup script (`devtools/format-code.sh`) handles remaining edge cases.
- Formatting commits are added to `.git-blame-ignore-revs` to reduce noise.
- Developers remain free to format code however they prefer locally.
2025-07-16 13:56:21 +02:00
..

Redis Outplug Plugin using hiredis library

REQUIREMENTS:

* hiredis ( https://github.com/redis/hiredis.git )

USAGE:

This plugin has three current "modes" that it supports:

1. "template"

This is the original mode that the plugin supported. You use an rsyslog template
to construct a command that is sent directly to redis. This mode currently has
an issue dealing with strings that contain spaces. It's useful for doing things
like incrementing counters for statistics.

```
module(load="omhiredis")

template(
    name="simple_count"
    type="string"
    string="HINCRBY testcount %programname% 1")

*.*     action(
            name="count_redis"
            type="omhiredis"
            mode="template"
            template="simple_count"
        )
```

2. "queue"
The queue mode will LPUSH your message to a redis list. Unlike the template
mode, it handles full rsyslog messages properly. If a template is not 
supplied, it will default to the RSYSLOG_ForwardFormat template. The "key" 
parameter is required.

```
module(load="omhiredis")

*.*     action(
            name="push_redis"
            type="omhiredis"
            mode="queue"
            key="testqueue"
        )
```

3. "publish"
The publish mode will PUBLISH to a redis channel. Unlike the template mode, 
it handles full rsyslog messages properly. If a template is not supplied,
it will default to the RSYSLOG_ForwardFormat template. The "key" 
parameter is required and will be used for the publish channel.

```
module(load="omhiredis")

*.*     action(
            name="publish_redis"
            type="omhiredis"
            mode="publish"
            key="testpublish"
        )
```


NOTES
* dequeuebatchsize now sets the pipeline size for hiredis, allowing pipelining commands.