Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddressEvent ¶
type AddressEvent struct { EventType EventType Address string ExtraData interface{} Utxos []explorer.Utxo }
func (AddressEvent) Type ¶
func (a AddressEvent) Type() EventType
type AddressObservable ¶
type AddressObservable struct { Address string BlindingKey []byte ExtraData interface{} // contains filtered or unexported fields }
func (*AddressObservable) Key ¶ added in v0.4.4
func (a *AddressObservable) Key() string
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 { Observe( explorerSvc explorer.Service, errChan chan error, eventChan chan Event, ) Key() string }
Observable represent object that can be observe on the blockchain.
func NewAddressObservable ¶ added in v0.4.4
func NewAddressObservable( address string, blindKey []byte, extraData interface{}, ) Observable
func NewOutpointsObservable ¶ added in v0.5.3
func NewOutpointsObservable( outpoints []Outpoint, extraData interface{}, ) Observable
func NewTransactionObservable ¶ added in v0.4.4
func NewTransactionObservable(txid string, extraData interface{}) Observable
type ObservableHandler ¶ added in v0.5.3
type ObservableHandler struct {
// contains filtered or unexported fields
}
func NewObservableHandler ¶ added in v0.5.3
func NewObservableHandler( observable Observable, explorerSvc explorer.Service, wg *sync.WaitGroup, interval time.Duration, eventChan chan Event, errChan chan error, ) *ObservableHandler
func (*ObservableHandler) Start ¶ added in v0.5.3
func (oh *ObservableHandler) Start()
func (ObservableHandler) Stop ¶ added in v0.5.3
func (oh ObservableHandler) Stop()
type Opts ¶
type Opts struct { ExplorerSvc explorer.Service // Crawler interval in milliseconds CrawlerInterval time.Duration ErrorHandler func(err error) }
Opts defines the parameters needed for creating a crawler service with NewService method
type OutpointsEvent ¶ added in v0.5.3
type OutpointsEvent struct { EventType EventType Outpoints []Outpoint ExtraData interface{} TxID string TxHex string BlockHash string BlockTime int }
func (OutpointsEvent) Type ¶ added in v0.5.3
func (o OutpointsEvent) Type() EventType
type OutpointsObservable ¶ added in v0.5.3
type OutpointsObservable struct { Outpoints []Outpoint ExtraData interface{} // contains filtered or unexported fields }
func (*OutpointsObservable) Key ¶ added in v0.5.3
func (o *OutpointsObservable) Key() string
type Service ¶
type Service interface { Start() Stop() AddObservable(observable Observable) RemoveObservable(observable Observable) 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 int ExtraData interface{} }
func (TransactionEvent) Type ¶
func (t TransactionEvent) Type() EventType
type TransactionObservable ¶
type TransactionObservable struct { TxID string TxHex string ExtraData interface{} // contains filtered or unexported fields }
func (*TransactionObservable) Key ¶ added in v0.4.4
func (t *TransactionObservable) Key() string
Click to show internal directories.
Click to hide internal directories.