Skip to content
This repository has been archived by the owner on Oct 28, 2022. It is now read-only.

Commit

Permalink
Merge pull request #356 from karimra/target-subsc-chan
Browse files Browse the repository at this point in the history
add ReadSubscriptions method
  • Loading branch information
karimra authored Mar 23, 2021
2 parents 94bae4c + 56bad1b commit 0e2c814
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions collector/target.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0e2c814

Please sign in to comment.