Documentation
¶
Index ¶
Constants ¶
View Source
const (
// DefaultQueueCacheSize is the default size of the queue cache.
DefaultQueueCacheSize = 16000
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Ledger ¶
type Ledger interface { GetConfig() config.Blockchain BlockHeight() uint32 HeaderHeight() uint32 }
Ledger is an interface to Blockchain sufficient for Service.
type OperationMode ¶ added in v0.108.0
type OperationMode byte
OperationMode is an enum that denotes the operation mode of the Fetcher. It can be either Blocks or Headers.
const ( // Blocks denotes that the Fetcher is working with blocks. Blocks OperationMode = iota // Headers denotes that the Fetcher is working with headers. Headers )
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is a service that fetches blocks from NeoFS.
func New ¶
func New(chain Ledger, cfg config.NeoFSBlockFetcher, logger *zap.Logger, put func(item bqueue.Indexable) error, shutdownCallback func(), opt OperationMode) (*Service, error)
New creates a new BlockFetcher Service.
func (*Service) IsShutdown ¶ added in v0.108.0
IsShutdown returns true if the NeoFS BlockFetcher service is completely shutdown. The service can not be started again.
Click to show internal directories.
Click to hide internal directories.