Documentation ¶
Index ¶
- type Emitter
- type HistoryProcessor
- type HistoryRetriever
- type OneShotEmitter
- type SortedStorenode
- type StorenodeConfigProvider
- type StorenodeCycle
- func (m *StorenodeCycle) Cycle(ctx context.Context)
- func (m *StorenodeCycle) DisconnectActiveStorenode(backoff time.Duration)
- func (m *StorenodeCycle) GetActiveStorenode() peer.ID
- func (m *StorenodeCycle) IsStorenodeAvailable(peerID peer.ID) bool
- func (m *StorenodeCycle) PerformStorenodeTask(fn func() error, options ...StorenodeTaskOption) error
- func (m *StorenodeCycle) SetStorenodeConfigProvider(provider StorenodeConfigProvider)
- func (m *StorenodeCycle) Start(ctx context.Context)
- func (m *StorenodeCycle) WaitForAvailableStoreNode(ctx context.Context) bool
- type StorenodeTaskOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Emitter ¶
func NewEmitter ¶
type HistoryProcessor ¶
type HistoryRetriever ¶
type HistoryRetriever struct {
// contains filtered or unexported fields
}
func NewHistoryRetriever ¶
func NewHistoryRetriever(store common.StorenodeRequestor, historyProcessor HistoryProcessor, logger *zap.Logger) *HistoryRetriever
type OneShotEmitter ¶
func NewOneshotEmitter ¶
func NewOneshotEmitter[T any]() *OneShotEmitter[T]
func (*OneShotEmitter[T]) Emit ¶
func (s *OneShotEmitter[T]) Emit(value T)
type SortedStorenode ¶
type StorenodeConfigProvider ¶
type StorenodeCycle ¶
type StorenodeCycle struct { sync.RWMutex StorenodeAvailableOneshotEmitter *OneShotEmitter[struct{}] StorenodeChangedEmitter *Emitter[peer.ID] StorenodeNotWorkingEmitter *Emitter[struct{}] StorenodeAvailableEmitter *Emitter[peer.ID] // contains filtered or unexported fields }
func NewStorenodeCycle ¶
func NewStorenodeCycle(logger *zap.Logger, pinger common.Pinger) *StorenodeCycle
func (*StorenodeCycle) Cycle ¶
func (m *StorenodeCycle) Cycle(ctx context.Context)
func (*StorenodeCycle) DisconnectActiveStorenode ¶
func (m *StorenodeCycle) DisconnectActiveStorenode(backoff time.Duration)
func (*StorenodeCycle) GetActiveStorenode ¶
func (m *StorenodeCycle) GetActiveStorenode() peer.ID
func (*StorenodeCycle) IsStorenodeAvailable ¶
func (m *StorenodeCycle) IsStorenodeAvailable(peerID peer.ID) bool
func (*StorenodeCycle) PerformStorenodeTask ¶
func (m *StorenodeCycle) PerformStorenodeTask(fn func() error, options ...StorenodeTaskOption) error
func (*StorenodeCycle) SetStorenodeConfigProvider ¶
func (m *StorenodeCycle) SetStorenodeConfigProvider(provider StorenodeConfigProvider)
func (*StorenodeCycle) Start ¶
func (m *StorenodeCycle) Start(ctx context.Context)
func (*StorenodeCycle) WaitForAvailableStoreNode ¶
func (m *StorenodeCycle) WaitForAvailableStoreNode(ctx context.Context) bool
type StorenodeTaskOption ¶
type StorenodeTaskOption func(*storenodeTaskParameters)
func WithPeerID ¶
func WithPeerID(peerID peer.ID) StorenodeTaskOption
Click to show internal directories.
Click to hide internal directories.