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