Skip to main content

Interface: NetworkNodeStub

Deprecated

This in an internal interface

Properties

addMessageListener

addMessageListener: (listener: (msg: StreamMessage) => void) => void

Type declaration

▸ (listener): void

Parameters
NameType
listener(msg: StreamMessage) => void
Returns

void


broadcast

broadcast: (streamMessage: StreamMessage) => Promise\<void>

Type declaration

▸ (streamMessage): Promise\<void>

Parameters
NameType
streamMessageStreamMessage
Returns

Promise\<void>


getDiagnosticInfo

getDiagnosticInfo: () => Record\<string, unknown>

Type declaration

▸ (): Record\<string, unknown>

Returns

Record\<string, unknown>


getMetricsContext

getMetricsContext: () => MetricsContext

Type declaration

▸ (): MetricsContext

Returns

MetricsContext


getNeighbors

getNeighbors: (streamPartId: StreamPartID) => readonly DhtAddress[]

Type declaration

▸ (streamPartId): readonly DhtAddress[]

Parameters
NameType
streamPartIdStreamPartID
Returns

readonly DhtAddress[]


getNodeId

getNodeId: () => DhtAddress

Type declaration

▸ (): DhtAddress

Returns

DhtAddress


getOptions

getOptions: () => NetworkOptions

Type declaration

▸ (): NetworkOptions

Returns

NetworkOptions


getPeerDescriptor

getPeerDescriptor: () => PeerDescriptor

Type declaration

▸ (): PeerDescriptor

Returns

PeerDescriptor


getStreamParts

getStreamParts: () => StreamPartID[]

Type declaration

▸ (): StreamPartID[]

Returns

StreamPartID[]


hasStreamPart

hasStreamPart: (streamPartId: StreamPartID) => boolean

Type declaration

▸ (streamPartId): boolean

Parameters
NameType
streamPartIdStreamPartID
Returns

boolean


join

join: (streamPartId: StreamPartID, neighborRequirement?: { minCount: number ; timeout: number }) => Promise\<void>

Type declaration

▸ (streamPartId, neighborRequirement?): Promise\<void>

Parameters
NameType
streamPartIdStreamPartID
neighborRequirement?Object
neighborRequirement.minCountnumber
neighborRequirement.timeoutnumber
Returns

Promise\<void>


leave

leave: (streamPartId: StreamPartID) => Promise\<void>

Type declaration

▸ (streamPartId): Promise\<void>

Parameters
NameType
streamPartIdStreamPartID
Returns

Promise\<void>


removeMessageListener

removeMessageListener: (listener: (msg: StreamMessage) => void) => void

Type declaration

▸ (listener): void

Parameters
NameType
listener(msg: StreamMessage) => void
Returns

void


setStreamPartEntryPoints

setStreamPartEntryPoints: (streamPartId: StreamPartID, peerDescriptors: PeerDescriptor[]) => void

Type declaration

▸ (streamPartId, peerDescriptors): void

Parameters
NameType
streamPartIdStreamPartID
peerDescriptorsPeerDescriptor[]
Returns

void

Methods

inspect

inspect(node, streamPartId): Promise\<boolean>

Parameters

NameType
nodePeerDescriptor
streamPartIdStreamPartID

Returns

Promise\<boolean>


isProxiedStreamPart

isProxiedStreamPart(streamPartId): boolean

Parameters

NameType
streamPartIdStreamPartID

Returns

boolean