Documentation ¶
Index ¶
- Variables
- func INXBlockMetadataCaller(handler interface{}, params ...interface{})
- func INXMilestoneCaller(handler interface{}, params ...interface{})
- type BlockSolidCallback
- type Events
- type Milestone
- type NodeBridge
- func (n *NodeBridge) Block(blockID iotago.BlockID) (*iotago.Block, error)
- func (n *NodeBridge) BlockMetadata(blockID iotago.BlockID) (*inx.BlockMetadata, error)
- func (n *NodeBridge) Client() inx.INXClient
- func (n *NodeBridge) ConfirmedMilestone() (*Milestone, error)
- func (n *NodeBridge) ConfirmedMilestoneIndex() uint32
- func (n *NodeBridge) INXNodeClient() *nodeclient.Client
- func (n *NodeBridge) IsNodeAlmostSynced() bool
- func (n *NodeBridge) IsNodeSynced() bool
- func (n *NodeBridge) LatestMilestone() (*Milestone, error)
- func (n *NodeBridge) LatestMilestoneIndex() uint32
- func (n *NodeBridge) ListenToBlocks(ctx context.Context, cancel context.CancelFunc, ...) error
- func (n *NodeBridge) ListenToLedgerUpdates(ctx context.Context, startIndex uint32, endIndex uint32, ...) error
- func (n *NodeBridge) Milestone(index uint32) (*Milestone, error)
- func (n *NodeBridge) MilestoneConeMetadata(ctx context.Context, cancel context.CancelFunc, index uint32, ...) error
- func (n *NodeBridge) NodeStatus() (*inx.NodeStatus, error)
- func (n *NodeBridge) ProtocolParameters() *iotago.ProtocolParameters
- func (n *NodeBridge) RegisterAPIRoute(route string, bindAddress string) error
- func (n *NodeBridge) RequestTips(ctx context.Context, count uint32, allowSemiLazy bool) (iotago.BlockIDs, error)
- func (n *NodeBridge) Run(ctx context.Context)
- func (n *NodeBridge) SubmitBlock(ctx context.Context, block *iotago.Block) (iotago.BlockID, error)
- func (n *NodeBridge) UnregisterAPIRoute(route string) error
- type TangleListener
- func (t *TangleListener) ClearBlockSolidCallbacks()
- func (t *TangleListener) DeregisterBlockSolidCallback(blockID iotago.BlockID)
- func (t *TangleListener) DeregisterBlockSolidEvent(blockID iotago.BlockID)
- func (t *TangleListener) DeregisterMilestoneConfirmedEvent(msIndex uint32)
- func (t *TangleListener) RegisterBlockSolidCallback(blockID iotago.BlockID, f BlockSolidCallback) error
- func (t *TangleListener) RegisterBlockSolidEvent(blockID iotago.BlockID) chan struct{}
- func (t *TangleListener) RegisterMilestoneConfirmedEvent(msIndex uint32) chan struct{}
- func (t *TangleListener) Run(ctx context.Context)
- type TangleListenerEvents
- type TipPoolListener
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrAlreadyRegistered = errors.New("callback for block ID is already registered")
ErrAlreadyRegistered is returned when a callback for the same block ID has already been registered.
Functions ¶
func INXBlockMetadataCaller ¶
func INXBlockMetadataCaller(handler interface{}, params ...interface{})
func INXMilestoneCaller ¶
func INXMilestoneCaller(handler interface{}, params ...interface{})
Types ¶
type BlockSolidCallback ¶
type BlockSolidCallback = func(*inx.BlockMetadata)
type Milestone ¶
type Milestone struct { MilestoneID iotago.MilestoneID Milestone *iotago.Milestone }
type NodeBridge ¶
type NodeBridge struct { // the logger used to log events. *logger.WrappedLogger NodeConfig *inx.NodeConfiguration Events *Events // contains filtered or unexported fields }
func NewNodeBridge ¶
func (*NodeBridge) BlockMetadata ¶
func (n *NodeBridge) BlockMetadata(blockID iotago.BlockID) (*inx.BlockMetadata, error)
func (*NodeBridge) Client ¶
func (n *NodeBridge) Client() inx.INXClient
func (*NodeBridge) ConfirmedMilestone ¶
func (n *NodeBridge) ConfirmedMilestone() (*Milestone, error)
func (*NodeBridge) ConfirmedMilestoneIndex ¶
func (n *NodeBridge) ConfirmedMilestoneIndex() uint32
func (*NodeBridge) INXNodeClient ¶
func (n *NodeBridge) INXNodeClient() *nodeclient.Client
func (*NodeBridge) IsNodeAlmostSynced ¶
func (n *NodeBridge) IsNodeAlmostSynced() bool
func (*NodeBridge) IsNodeSynced ¶
func (n *NodeBridge) IsNodeSynced() bool
func (*NodeBridge) LatestMilestone ¶
func (n *NodeBridge) LatestMilestone() (*Milestone, error)
func (*NodeBridge) LatestMilestoneIndex ¶
func (n *NodeBridge) LatestMilestoneIndex() uint32
func (*NodeBridge) ListenToBlocks ¶
func (n *NodeBridge) ListenToBlocks(ctx context.Context, cancel context.CancelFunc, consumer func(block *iotago.Block)) error
func (*NodeBridge) ListenToLedgerUpdates ¶
func (n *NodeBridge) ListenToLedgerUpdates(ctx context.Context, startIndex uint32, endIndex uint32, consume func(update *inx.LedgerUpdate) error) error
func (*NodeBridge) MilestoneConeMetadata ¶
func (n *NodeBridge) MilestoneConeMetadata(ctx context.Context, cancel context.CancelFunc, index uint32, consumer func(metadata *inx.BlockMetadata)) error
func (*NodeBridge) NodeStatus ¶
func (n *NodeBridge) NodeStatus() (*inx.NodeStatus, error)
func (*NodeBridge) ProtocolParameters ¶
func (n *NodeBridge) ProtocolParameters() *iotago.ProtocolParameters
func (*NodeBridge) RegisterAPIRoute ¶
func (n *NodeBridge) RegisterAPIRoute(route string, bindAddress string) error
func (*NodeBridge) RequestTips ¶
func (*NodeBridge) Run ¶
func (n *NodeBridge) Run(ctx context.Context)
func (*NodeBridge) SubmitBlock ¶
func (*NodeBridge) UnregisterAPIRoute ¶
func (n *NodeBridge) UnregisterAPIRoute(route string) error
type TangleListener ¶
type TangleListener struct { Events *TangleListenerEvents // contains filtered or unexported fields }
func NewTangleListener ¶
func NewTangleListener(nodeBridge *NodeBridge) *TangleListener
func (*TangleListener) ClearBlockSolidCallbacks ¶
func (t *TangleListener) ClearBlockSolidCallbacks()
ClearBlockSolidCallbacks removes all previously registered blockSolidCallbacks.
func (*TangleListener) DeregisterBlockSolidCallback ¶
func (t *TangleListener) DeregisterBlockSolidCallback(blockID iotago.BlockID)
DeregisterBlockSolidCallback removes a previously registered callback for blockID.
func (*TangleListener) DeregisterBlockSolidEvent ¶
func (t *TangleListener) DeregisterBlockSolidEvent(blockID iotago.BlockID)
func (*TangleListener) DeregisterMilestoneConfirmedEvent ¶
func (t *TangleListener) DeregisterMilestoneConfirmedEvent(msIndex uint32)
func (*TangleListener) RegisterBlockSolidCallback ¶
func (t *TangleListener) RegisterBlockSolidCallback(blockID iotago.BlockID, f BlockSolidCallback) error
RegisterBlockSolidCallback registers a callback for when a block with blockID becomes solid. If another callback for the same ID has already been registered, an error is returned.
func (*TangleListener) RegisterBlockSolidEvent ¶
func (t *TangleListener) RegisterBlockSolidEvent(blockID iotago.BlockID) chan struct{}
func (*TangleListener) RegisterMilestoneConfirmedEvent ¶
func (t *TangleListener) RegisterMilestoneConfirmedEvent(msIndex uint32) chan struct{}
func (*TangleListener) Run ¶
func (t *TangleListener) Run(ctx context.Context)
type TangleListenerEvents ¶
type TipPoolListener ¶
type TipPoolListener struct {
// contains filtered or unexported fields
}
func NewTipPoolListener ¶
func NewTipPoolListener(nodeBridge *NodeBridge, interval time.Duration) *TipPoolListener
func (*TipPoolListener) GetTipsPoolSizes ¶
func (t *TipPoolListener) GetTipsPoolSizes() (uint32, uint32)
func (*TipPoolListener) Run ¶
func (t *TipPoolListener) Run(ctx context.Context)
Click to show internal directories.
Click to hide internal directories.