Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: expand DataTag from Byte to uint32 #389

Merged
merged 2 commits into from Nov 4, 2022

Conversation

wujunzhuo
Copy link
Collaborator

No description provided.

Copy link
Member

@fanweixiao fanweixiao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is define a Tag type better than uint32?

core/frame/data_frame.go Outdated Show resolved Hide resolved
@@ -4,16 +4,19 @@ import (
"github.com/yomorun/y3"
)

// Tag is used for data router
type Tag uint32

// PayloadFrame is a Y3 encoded bytes, Tag is a fixed value TYPE_ID_PAYLOAD_FRAME
Copy link
Member

@fanweixiao fanweixiao Nov 4, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wujunzhuo

// Tag is used for representing user defined data, system use Tag to route data to different handlers.
type Tag uint32

// PayloadFrame is a Y3 encoded bytes, .
type PayloadFrame struct {
	Tag      Tag    // Tag is defined by user
	Carriage []byte // Carriage is user's payload
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will commit new PR after merge, let's finish this PR first.

@fanweixiao fanweixiao changed the title feat: expand DataTag to uint32 feat: expand DataTag from Byte to uint32 Nov 4, 2022
@fanweixiao fanweixiao merged commit d2e4851 into yomorun:master Nov 4, 2022
@wujunzhuo wujunzhuo deleted the feat/tag branch November 7, 2022 03:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants