Interface: NetworkNodeStub
Deprecated
This in an internal interface
Properties
addMessageListener
• addMessageListener: (listener
: (msg
: StreamMessage
) => void
) => void
Type declaration
▸ (listener
): void
Parameters
Name | Type |
---|---|
listener | (msg : StreamMessage ) => void |
Returns
void
broadcast
• broadcast: (streamMessage
: StreamMessage
) => Promise
\<void
>
Type declaration
▸ (streamMessage
): Promise
\<void
>
Parameters
Name | Type |
---|---|
streamMessage | StreamMessage |
Returns
Promise
\<void
>
getDiagnosticInfo
• getDiagnosticInfo: () => Record
\<string
, unknown
>
Type declaration
▸ (): Record
\<string
, unknown
>
Returns
Record
\<string
, unknown
>
getMetricsContext
• getMetricsContext: () => MetricsContext
Type declaration
▸ (): MetricsContext
Returns
getNeighbors
• getNeighbors: (streamPartId
: StreamPartID
) => readonly DhtAddress
[]
Type declaration
▸ (streamPartId
): readonly DhtAddress
[]
Parameters
Name | Type |
---|---|
streamPartId | StreamPartID |
Returns
readonly DhtAddress
[]
getNodeId
• getNodeId: () => DhtAddress
Type declaration
▸ (): DhtAddress
Returns
getOptions
• getOptions: () => NetworkOptions
Type declaration
▸ (): NetworkOptions
Returns
NetworkOptions
getPeerDescriptor
• getPeerDescriptor: () => PeerDescriptor
Type declaration
▸ (): PeerDescriptor
Returns
getStreamParts
• getStreamParts: () => StreamPartID
[]
Type declaration
▸ (): StreamPartID
[]
Returns
hasStreamPart
• hasStreamPart: (streamPartId
: StreamPartID
) => boolean
Type declaration
▸ (streamPartId
): boolean
Parameters
Name | Type |
---|---|
streamPartId | StreamPartID |
Returns
boolean
join
• join: (streamPartId
: StreamPartID
, neighborRequirement?
: { minCount
: number
; timeout
: number
}) => Promise
\<void
>
Type declaration
▸ (streamPartId
, neighborRequirement?
): Promise
\<void
>
Parameters
Name | Type |
---|---|
streamPartId | StreamPartID |
neighborRequirement? | Object |
neighborRequirement.minCount | number |
neighborRequirement.timeout | number |
Returns
Promise
\<void
>
leave
• leave: (streamPartId
: StreamPartID
) => Promise
\<void
>
Type declaration
▸ (streamPartId
): Promise
\<void
>
Parameters
Name | Type |
---|---|
streamPartId | StreamPartID |
Returns
Promise
\<void
>
removeMessageListener
• removeMessageListener: (listener
: (msg
: StreamMessage
) => void
) => void
Type declaration
▸ (listener
): void
Parameters
Name | Type |
---|---|
listener | (msg : StreamMessage ) => void |
Returns
void
setStreamPartEntryPoints
• setStreamPartEntryPoints: (streamPartId
: StreamPartID
, peerDescriptors
: PeerDescriptor
[]) => void
Type declaration
▸ (streamPartId
, peerDescriptors
): void
Parameters
Name | Type |
---|---|
streamPartId | StreamPartID |
peerDescriptors | PeerDescriptor [] |
Returns
void
Methods
inspect
▸ inspect(node
, streamPartId
): Promise
\<boolean
>
Parameters
Name | Type |
---|---|
node | PeerDescriptor |
streamPartId | StreamPartID |
Returns
Promise
\<boolean
>
isProxiedStreamPart
▸ isProxiedStreamPart(streamPartId
): boolean
Parameters
Name | Type |
---|---|
streamPartId | StreamPartID |
Returns
boolean