status-go/services/browsers/service.go

43 lines
727 B
Go
Raw Permalink Normal View History

package browsers
import (
"github.com/ethereum/go-ethereum/p2p"
"github.com/ethereum/go-ethereum/rpc"
)
// NewService initializes service instance.
2019-07-25 05:35:09 +00:00
func NewService(db *Database) *Service {
return &Service{db: db}
}
// Service is a browsers service.
type Service struct {
db *Database
}
// Start a service.
func (s *Service) Start() error {
return nil
}
// Stop a service.
func (s *Service) Stop() error {
2019-07-25 05:35:09 +00:00
return nil
}
// APIs returns list of available RPC APIs.
func (s *Service) APIs() []rpc.API {
return []rpc.API{
{
Namespace: "browsers",
Version: "0.1.0",
2019-07-25 05:35:09 +00:00
Service: NewAPI(s.db),
},
}
}
// Protocols returns list of p2p protocols.
func (s *Service) Protocols() []p2p.Protocol {
return nil
}