Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewObservableStatus ¶ added in v0.2.0
func NewObservableStatus() *observableStatus
Types ¶
type AddressEvent ¶
type AddressEvent struct { EventType EventType AccountIndex int Address string Utxos []explorer.Utxo }
func (AddressEvent) Type ¶
func (a AddressEvent) Type() EventType
type AddressObservable ¶
type CloseEvent ¶ added in v0.2.0
type CloseEvent struct{}
func (CloseEvent) Type ¶ added in v0.2.0
func (q CloseEvent) Type() EventType
type Event ¶
type Event interface {
Type() EventType
}
Event are emitted through a channel during observation.
type Observable ¶
type Observable interface {
// contains filtered or unexported methods
}
Observable represent object that can be observe on the blockchain.
type Opts ¶
type Opts struct { ExplorerSvc explorer.Service //crawler interval in milliseconds CrawlerInterval time.Duration //number of requests per second ExplorerLimit int //number of bursts tokens permitted ExplorerTokenBurst int ErrorHandler func(err error) }
Opts defines the parameters needed for creating a crawler service with NewService method
type Service ¶
type Service interface { Start() Stop() AddObservable(observable Observable) RemoveObservable(observable Observable) IsObservingAddresses(addresses []string) bool GetEventChannel() chan Event }
Service is the interface for Crawler
func NewService ¶
NewService returns an utxoCrawelr that is ready for watch for blockchain activites. Use Start and Stop methods to manage it.
type TransactionEvent ¶
type TransactionEvent struct { TxID string TxHex string EventType EventType BlockHash string BlockTime float64 }
func (TransactionEvent) Type ¶
func (t TransactionEvent) Type() EventType
type TransactionObservable ¶
Click to show internal directories.
Click to hide internal directories.