17 return interfaces.Any
18}
19
20func New(configFile string) []interfaces.FunctionMetadata { 21 res := make([]interfaces.FunctionMetadata, 0)
22 f := &reduce{}
23 functions := []string{"reduceSeries", "reduce"}
64 return NewWithLimiter(logger, config, tldCacheDisabled, requireSuccessAll, l)
65}
66
67func NewWithLimiter(logger *zap.Logger, config types.BackendV2, tldCacheDisabled, requireSuccessAll bool, l limiter.ServerLimiter) (types.BackendServer, merry.Error) { 68 logger = logger.With(zap.String("type", "protoV3Group"), zap.String("name", config.GroupName))
69
70 httpClient := helper.GetHTTPClient(logger, config)
58 return []types.BackendServer{c}
59}
60
61func NewWithLimiter(logger *zap.Logger, config types.BackendV2, tldCacheDisabled, requireSuccessAll bool, l limiter.ServerLimiter) (types.BackendServer, merry.Error) { 62 logger = logger.With(zap.String("type", "protoV2Group"), zap.String("name", config.GroupName))
63
64 httpClient := helper.GetHTTPClient(logger, config)
175 return NewWithEverythingInitialized(logger, config, tldCacheDisabled, requireSuccessAll, limiter, step, maxPointsPerQuery, forceMinStepInterval, delay, httpQuery, httpClient)
176}
177
178func NewWithEverythingInitialized(logger *zap.Logger, config types.BackendV2, tldCacheDisabled, requireSuccessAll bool, limiter limiter.ServerLimiter, step, maxPointsPerQuery int64, forceMinStepInterval time.Duration, delay StartDelay, httpQuery *helper.HttpQuery, httpClient *http.Client) (types.BackendServer, merry.Error) {179 c := &PrometheusGroup{
180 groupName: config.GroupName,
181 servers: config.Servers,
50 graphitePrefix string
51}
52
53func NewWithLimiter(logger *zap.Logger, config types.BackendV2, tldCacheDisabled, requireSuccessAll bool, limiter limiter.ServerLimiter) (types.BackendServer, merry.Error) { 54 logger = logger.With(zap.String("type", "irondb"), zap.String("protocol", config.Protocol), zap.String("name", config.GroupName))
55
56 logger.Warn("support for this backend protocol is experimental, use with caution")
Unused parameters in functions or methods should be replaced with _
(underscore) or removed.
Functions or methods with unused parameters can be a symptom of unfinished
refactoring or a bug. If an unused parameter is present, it should be named _
(underscore) to avoid raising this issue and better readability.
func abc(unused string) {
fmt.Println("Not using any passed params.")
}
func abc(_ string) {
fmt.Println("Not using any passed params.")
}
func abc() {
fmt.Println("Not using any passed params.")
}