-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
store parents in the header #202
Conversation
@@ -465,3 +508,48 @@ export class WALStoreImpl extends BaseStoreImpl implements WALStore { | |||
return this.gateway.destroy(this.url()); | |||
} | |||
} | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had trouble with the node module in the smoke test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
).decodeMetaBlocks(bytes); | ||
expect(decodedHeader).toBeDefined(); | ||
expect(decodedHeader.cars).toBeDefined(); | ||
expect(decodedHeader.cars[0].toString()).toEqual(cid.toString()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how this is twice as long now... I bet we can flat it to one encoding
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I want the cid and parents to be in json, maybe we should just bring the cars up to the json also -- json means we don't need imports in our server code
Will make other connectors easier fireproof-storage/connect#7 (comment) |
@@ -46,6 +46,7 @@ export class ConnectPartyKit extends Connection { | |||
const base64String = event.data; | |||
const uint8ArrayBuffer = Base64.toUint8Array(base64String); | |||
const eventBlock = await this.decodeEventBlock(uint8ArrayBuffer); | |||
// there should be a callback in the MetaStore that we can call from places like this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@valorant-dhruv you'll need this when it comes time to listen to the websocket
I think this has what is needed to connect the meta with parent cid tracking |
This changes the encoding so all the connectors can support multi-writer easily.
It basically brings what was in the wire encoding for netlify / aws / partykit etc into the core.