From 90dd2fbe2e10ba1f1347e9b54392d5ee82e18dfa Mon Sep 17 00:00:00 2001 From: Antal Nemes Date: Wed, 27 Mar 2024 16:46:49 +0100 Subject: [PATCH] ctl: support fetching config id Signed-off-by: Antal Nemes --- pkg/syslog-ng-ctl/config.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/syslog-ng-ctl/config.go b/pkg/syslog-ng-ctl/config.go index 1ebee4a..3995d59 100644 --- a/pkg/syslog-ng-ctl/config.go +++ b/pkg/syslog-ng-ctl/config.go @@ -25,3 +25,8 @@ func OriginalConfig(ctx context.Context, cc ControlChannel) (string, error) { func PreprocessedConfig(ctx context.Context, cc ControlChannel) (string, error) { return cc.SendCommand(ctx, "CONFIG GET PREPROCESSED") } + +// PreprocessedConfig sends the CONFIG ID command to syslog-ng +func ConfigID(ctx context.Context, cc ControlChannel) (string, error) { + return cc.SendCommand(ctx, "CONFIG ID") +}