From 56bad1b075579c483c9937daf397b1387370476d Mon Sep 17 00:00:00 2001 From: Karim Radhouani Date: Tue, 23 Mar 2021 22:09:09 +0800 Subject: [PATCH] add ReadSubscriptions method --- collector/target.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/collector/target.go b/collector/target.go index fda513f5c..67141515a 100644 --- a/collector/target.go +++ b/collector/target.go @@ -336,6 +336,10 @@ func (t *Target) Stop() { t.stopped = true } +func (t *Target) ReadSubscriptions() (chan *SubscribeResponse, chan *TargetError) { + return t.subscribeResponses, t.errors +} + func loadCerts(tlscfg *tls.Config, c *TargetConfig) error { if *c.TLSCert != "" && *c.TLSKey != "" { certificate, err := tls.LoadX509KeyPair(*c.TLSCert, *c.TLSKey)