talek
talek copied to clipboard
LibPDB API
Currently, the api in libpdb/client.go
doesn't really make sense:
- publishtrace and poll trace are debug methods and should be in a test class
- subscribe doesn't provide any interface for actually getting updates to the topic
- No way to cancel a subscription
- CreateTopic doesn't allow specification of password, and feels pretty disconnected from publish.
Attempt as defining an exposed API is happening at #27
The merged #27 gets us pretty close to an external interface that is usable
I think we'll need to revisit the API for subscription pretty soon. In particular, the channel of []byte delivering messages isn't a rich enough interface for us to communicate network errors or the need to re-synchronize.
Noting one addition to the API made in the last round of debugging:
.Flush()
has been added, which allows the user to wait until in-progress operations have been committed to the system.