Skip to content

Commit

Permalink
feat: add limits-frontend service
Browse files Browse the repository at this point in the history
  • Loading branch information
grobinson-grafana committed Jan 9, 2025
1 parent 70d8206 commit 7ed8d02
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/limits/frontend/config.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package frontend

type Config struct {
}
33 changes: 33 additions & 0 deletions pkg/limits/frontend/service.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package frontend

import (
"context"

"github.com/grafana/dskit/services"
"github.com/grafana/go-kit/log"
"github.com/prometheus/client_golang/prometheus"
)

type IngestLimits struct {
cfg Config
logger log.Logger
services.Service
}

func New(cfg Config, logger log.Logger, _ prometheus.Registerer) (*IngestLimits, error) {
l := &IngestLimits{}
l.Service = services.NewBasicService(l.starting, l.running, l.stopping)

Check failure on line 19 in pkg/limits/frontend/service.go

View workflow job for this annotation

GitHub Actions / check / golangciLint

cannot use l.stopping (value of type func(_ context.Context) error) as services.StoppingFn value in argument to services.NewBasicService (typecheck)
return l, nil
}

func (l *IngestLimits) starting(_ context.Context) error {
return nil
}

func (l *IngestLimits) running(_ context.Context) error {
return nil
}

func (l *IngestLimits) stopping(_ context.Context) error {
return nil
}

0 comments on commit 7ed8d02

Please sign in to comment.