Documentation ¶
Index ¶
- func BlockInterceptor(srv *Service, network utils.Network, networkId utils.NetworkID, ...) func(block *types.Block) (*types.Block, error)
- func InjectSubscribers(service *Service, network utils.Network, networkId utils.NetworkID) error
- func Run(ctx *cli.Context) error
- func UnpackerInterceptor(srv *Service) func(event *events.Unpack) error
- type Server
- type Service
- type SyncDirection
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BlockInterceptor ¶
func BlockInterceptor(srv *Service, network utils.Network, networkId utils.NetworkID, direction SyncDirection) func(block *types.Block) (*types.Block, error)
BlockInterceptor -
func InjectSubscribers ¶
InjectSubscribers will look into map of the subscribers and attempt to register them against subscriber manager. In case of any issues, it will sequentially fail. It's deliberate to fail on sequence instead of spawning goroutines and returning back errors.
Types ¶
type Server ¶
type Server struct { *Service server_pb.UnimplementedUnpackServer // contains filtered or unexported fields }
func (*Server) Unpack ¶
func (s *Server) Unpack(ctx context.Context, req *server_pb.UnpackRequest) (resp *server_pb.UnpackResponse, err error)
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
type SyncDirection ¶
type SyncDirection string
var ( HeadSyncDirection SyncDirection = "head" ArchiveSyncDirection SyncDirection = "archive" )
func (SyncDirection) String ¶
func (s SyncDirection) String() string
Click to show internal directories.
Click to hide internal directories.