github.com/status-im/status-go@v1.1.0/services/appmetrics/service.go (about) 1 package appmetrics 2 3 import ( 4 "github.com/ethereum/go-ethereum/p2p" 5 "github.com/ethereum/go-ethereum/rpc" 6 7 "github.com/status-im/status-go/appmetrics" 8 ) 9 10 func NewService(db *appmetrics.Database) *Service { 11 return &Service{db: db} 12 } 13 14 type Service struct { 15 db *appmetrics.Database 16 } 17 18 func (s *Service) Start() error { 19 return nil 20 } 21 22 func (s *Service) Stop() error { 23 return nil 24 } 25 26 func (s *Service) APIs() []rpc.API { 27 return []rpc.API{ 28 { 29 Namespace: "appmetrics", 30 Version: "0.1.0", 31 Service: NewAPI(s.db), 32 Public: true, 33 }, 34 } 35 } 36 37 func (s *Service) Protocols() []p2p.Protocol { 38 return nil 39 }