wire in the new 'limits.Agent' infrastructure; extend the 'metrics.Agent' to support additional 'metrics.UsageSink' instances (#271)

This commit is contained in:
Michael Quigley
2023-03-16 15:05:39 -04:00
committed by Kenneth Bingham
parent e824c87d08
commit 29f38de546
4 changed files with 51 additions and 5 deletions

View File

@ -0,0 +1,27 @@
package limits
import (
"github.com/openziti/zrok/controller/metrics"
"github.com/openziti/zrok/controller/store"
"github.com/openziti/zrok/controller/zrokEdgeSdk"
"github.com/sirupsen/logrus"
)
type Agent struct {
}
func NewAgent(cfg *Config, ifxCfg *metrics.InfluxConfig, zCfg *zrokEdgeSdk.Config, str *store.Store) (*Agent, error) {
return &Agent{}, nil
}
func (a *Agent) Start() error {
return nil
}
func (a *Agent) Stop() {
}
func (a *Agent) Handle(u *metrics.Usage) error {
logrus.Infof("handling: %v", u)
return nil
}