Documentation
¶
Overview ¶
File: helper.go
File: log.go
File: sentinel.go
File: sentinel_coordinator.go
Index ¶
- Constants
- func ConvertAPILogToTypesLog(log api.Log) (*types.Log, error)
- func GetLogger(t *testing.T, componentName string) zerolog.Logger
- type AddChainConfig
- type Sentinel
- func (s *Sentinel) AddChain(acc AddChainConfig) error
- func (s *Sentinel) Close()
- func (s *Sentinel) RemoveChain(chainID int64) error
- func (s *Sentinel) Subscribe(chainID int64, address common.Address, topic common.Hash) (chan api.Log, error)
- func (s *Sentinel) Unsubscribe(chainID int64, address common.Address, topic common.Hash, ch chan api.Log) error
- type SentinelConfig
- type SentinelCoordinator
Constants ¶
View Source
const (
LogLevelEnvVar = "SENTINEL_LOG_LEVEL"
)
Variables ¶
This section is empty.
Functions ¶
func ConvertAPILogToTypesLog ¶
ConvertAPILogToTypesLog maps an api.Log to a types.Log. Returns a pointer to types.Log and an error if mapping fails.
Types ¶
type AddChainConfig ¶
type AddChainConfig struct {
ChainID int64
PollInterval time.Duration
BlockchainClient api.BlockchainClient
}
type Sentinel ¶
type Sentinel struct {
// contains filtered or unexported fields
}
func NewSentinel ¶
func NewSentinel(cfg SentinelConfig) *Sentinel
NewSentinel initializes and returns a new Sentinel instance.
func (*Sentinel) AddChain ¶
func (s *Sentinel) AddChain(acc AddChainConfig) error
AddChain adds a new chain to Sentinel.
func (*Sentinel) Close ¶
func (s *Sentinel) Close()
Close shuts down all chains and the global registry.
func (*Sentinel) RemoveChain ¶
RemoveChain removes a chain from Sentinel.
type SentinelConfig ¶
type SentinelConfig struct {
// contains filtered or unexported fields
}
SentinelConfig holds configuration for the Sentinel.
type SentinelCoordinator ¶ added in v0.1.2
type SentinelCoordinator struct {
Sentinel *Sentinel
Ctx context.Context
// contains filtered or unexported fields
}
func NewSentinelCoordinator ¶ added in v0.1.2
func NewSentinelCoordinator(log zerolog.Logger) *SentinelCoordinator
Directories
¶
| Path | Synopsis |
|---|---|
|
File: api/blockchain_client.go
|
File: api/blockchain_client.go |
|
File: blockchain_client_wrapper/geth_wrapper.go
|
File: blockchain_client_wrapper/geth_wrapper.go |
|
File: internal/mock_blockchain_client.go
|
File: internal/mock_blockchain_client.go |
|
chain_poller
File: internal/chain_poller/chain_poller.go
|
File: internal/chain_poller/chain_poller.go |
|
chain_poller_service
File: internal/chain_poller_service/chain_poller_service.go
|
File: internal/chain_poller_service/chain_poller_service.go |
|
subscription_manager
File: internal/subscription_manager/subscription_manager.go
|
File: internal/subscription_manager/subscription_manager.go |
Click to show internal directories.
Click to hide internal directories.