1
0
Fork 0
mirror of https://github.com/anyproto/any-sync.git synced 2025-06-08 05:57:03 +09:00
any-sync/app/debugstat/noop.go
2023-11-21 16:56:38 +01:00

42 lines
688 B
Go

package debugstat
import (
"context"
"github.com/anyproto/any-sync/app"
)
func NewNoOp() StatService {
return NoOpStatService{}
}
type NoOpStatService struct {
}
func (n NoOpStatService) Init(a *app.App) (err error) {
return nil
}
func (n NoOpStatService) Name() (name string) {
return CName
}
func (n NoOpStatService) Run(ctx context.Context) (err error) {
return nil
}
func (n NoOpStatService) Close(ctx context.Context) (err error) {
return nil
}
func (n NoOpStatService) AddProvider(provider StatProvider) {
return
}
func (n NoOpStatService) RemoveProvider(provider StatProvider) {
return
}
func (n NoOpStatService) GetStat() StatSummary {
return StatSummary{}
}