prysm-pulse/sharding/observer/actor.go
Raul Jordan dd384d3a22 sharding: refactor based on new design doc
Former-commit-id: b2defb3e277217d0d5bef86f1d4078668791d251 [formerly 6a6bd5c309442805ccac942325e0feef69dd17ab]
Former-commit-id: 2a26568478ed072db7c8e299eb40644b1c7c10d2
2018-06-02 18:29:35 -04:00

33 lines
904 B
Go

// Package observer launches a service attached to the sharding node
// that simply observes activity across the sharded Ethereum network.
package observer
import (
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/sharding"
)
// Observer holds functionality required to run an observer service
// in a sharded system. Must satisfy the Service interface defined in
// sharding/service.go.
type Observer struct {
node sharding.ShardingClient
}
// NewObserver creates a new observer instance.
func NewObserver(node sharding.ShardingClient) (*Observer, error) {
return &Observer{node}, nil
}
// Start the main routine for an observer.
func (o *Observer) Start() error {
log.Info("Starting shard observer service")
return nil
}
// Stop the main loop for observing the shard network.
func (o *Observer) Stop() error {
log.Info("Stopping shard observer service")
return nil
}