Skip to content

Commit

Permalink
refactor dirs
Browse files Browse the repository at this point in the history
  • Loading branch information
vcastellm committed Jun 5, 2024
1 parent 45509ce commit 62052e7
Show file tree
Hide file tree
Showing 16 changed files with 70 additions and 35 deletions.
5 changes: 5 additions & 0 deletions downloader/downloader.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package downloader

type Downloader interface {
Download() string
}
5 changes: 5 additions & 0 deletions downloader/trustedstate/trustedstate.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package trustedstate

type TrustedState struct {
Source string
}
7 changes: 7 additions & 0 deletions driver/driver.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// Interface for drivers

package driver

type Driver interface {
Drive() string
}
10 changes: 10 additions & 0 deletions driver/l1infotree/l1infotree.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Specific implementation of the dirver interface for L1InfoTree

package l1infotree

type L1InfoTree struct {
}

func (l1it *L1InfoTree) Process() string {
return "L1InfoTree"
}
10 changes: 10 additions & 0 deletions processor/erigon/erigon.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Specific implementation of the processor interface for Erigon

package erigon

type Erigon struct {
}

func (e *Erigon) Process() string {
return "Erigon"
}
8 changes: 8 additions & 0 deletions processor/l1infotree/l1infotree.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package l1infotree

type L1InfoTree struct {
}

func (l1it *L1InfoTree) Process() string {
return "L1InfoTree"
}
5 changes: 5 additions & 0 deletions processor/processor.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package processor

type Processor interface {
Process() string
}
Empty file removed sequencermanager/.gitkeep
Empty file.
9 changes: 9 additions & 0 deletions source/datastream/datastream.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package datastream

type Datastream struct {
Source string
}

func (d *Datastream) Source() string {
return d.Source
}
5 changes: 5 additions & 0 deletions source/source.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package source

type Source interface {
Source() string
}
5 changes: 5 additions & 0 deletions sourcemanager/sourcemanager.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package sourcemanager

type SourceManager struct {
Source Source
}
9 changes: 0 additions & 9 deletions syncer/ethprovider/ethprovider.go

This file was deleted.

9 changes: 0 additions & 9 deletions syncer/interfaces.go

This file was deleted.

1 change: 0 additions & 1 deletion syncer/provider.go

This file was deleted.

2 changes: 1 addition & 1 deletion syncer/storage/storage.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package storage

// Storage is an interface for the storage of the syncer
type StorageService interface {
type Storage interface {
GetData() []byte
GetLatestVerifiedBlock() uint64
}
15 changes: 0 additions & 15 deletions syncer/syncer.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,4 @@ type Syncer interface {
Start() error
// Stop stops the syncer
Stop() error
// Synced returns true if the syncer is synced
Synced() bool
// SyncedChan returns a channel that is closed when the syncer is synced
SyncedChan() <-chan struct{}
// LatestVerifiedBlock returns the latest verified block
LatestVerifiedBlock() uint64
// LatestBlock returns the latest block
LatestBlock() uint64
// SyncedBlock returns the latest block that is synced
SyncedBlock() uint64
// SyncedBlockChan returns a channel that is closed when the latest block is synced
SyncedBlockChan() <-chan struct{}
}

type Sync struct {
}

0 comments on commit 62052e7

Please sign in to comment.