Skip to content

provider: Expose provider connectivity status #1171

@phillebaba

Description

@phillebaba

The new provider is a great addition and removes a lot of complexity burden for projects using the DHT, amazing work!

After doing some experiments with the provider I realized that it would be nice to expose some of the connectivity functionality outside of the package. Specifically the isOffline function would be nice to be able to call to be able to use in health checking.

Additionally I was a bit inspired by the internal connectivity package that checks if the router is able to find other peers. My thinking here is that I want to implement some custom bootstrap triggering when the provider is in an offline state. While I could probably implement this on my own outside the provider package it would mean that the checking logic would have to be run twice. Would it be possible to either additional callback handlers for online and offline events, alternatively the ability to define my own connectivity implementation.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions