Documentation ¶
Index ¶
- Constants
- type SafeClient
- type SafeEthClient
- func (c *SafeEthClient) Close()
- func (c *SafeEthClient) GetClientAndVersion() (string, error)
- func (c *SafeEthClient) SubscribeFilterLogs(ctx context.Context, q ethereum.FilterQuery, ch chan<- types.Log) (ethereum.Subscription, error)
- func (c *SafeEthClient) SubscribeNewHead(ctx context.Context, ch chan<- *types.Header) (ethereum.Subscription, error)
- type SafeEthClientOption
- func WithCustomCreateClient(createClient func(string, logging.Logger) (eth.Client, error)) SafeEthClientOption
- func WithHeaderTimeout(timeout time.Duration) SafeEthClientOption
- func WithInstrumentedCreateClient(collector *rpccalls.Collector) SafeEthClientOption
- func WithLogFilteringParams(chunkSize, maxRange uint64) SafeEthClientOption
- func WithLogResubInterval(interval time.Duration) SafeEthClientOption
- type SafeSubscription
Constants ¶
View Source
const ( BLOCK_CHUNK_SIZE = 100 BLOCK_MAX_RANGE = 100 LOG_RESUB_INTERVAL = 5 * time.Minute HEADER_TIMEOUT = 30 * time.Second )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SafeClient ¶
type SafeEthClient ¶
func NewSafeEthClient ¶
func NewSafeEthClient(rpcUrl string, logger logging.Logger, opts ...SafeEthClientOption) (*SafeEthClient, error)
func (*SafeEthClient) Close ¶
func (c *SafeEthClient) Close()
func (*SafeEthClient) GetClientAndVersion ¶
func (c *SafeEthClient) GetClientAndVersion() (string, error)
func (*SafeEthClient) SubscribeFilterLogs ¶
func (*SafeEthClient) SubscribeNewHead ¶
type SafeEthClientOption ¶
type SafeEthClientOption func(*SafeEthClient)
func WithCustomCreateClient ¶
func WithHeaderTimeout ¶
func WithHeaderTimeout(timeout time.Duration) SafeEthClientOption
func WithInstrumentedCreateClient ¶
func WithInstrumentedCreateClient(collector *rpccalls.Collector) SafeEthClientOption
func WithLogFilteringParams ¶
func WithLogFilteringParams(chunkSize, maxRange uint64) SafeEthClientOption
func WithLogResubInterval ¶
func WithLogResubInterval(interval time.Duration) SafeEthClientOption
type SafeSubscription ¶
type SafeSubscription struct {
// contains filtered or unexported fields
}
func NewSafeSubscription ¶
func NewSafeSubscription(sub ethereum.Subscription) *SafeSubscription
func (*SafeSubscription) Err ¶
func (s *SafeSubscription) Err() <-chan error
func (*SafeSubscription) SetUnderlyingSub ¶
func (s *SafeSubscription) SetUnderlyingSub(sub ethereum.Subscription)
func (*SafeSubscription) Unsubscribe ¶
func (s *SafeSubscription) Unsubscribe()
Click to show internal directories.
Click to hide internal directories.