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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support configurable number of bits #2

Merged
merged 20 commits into from
Jun 30, 2021

Conversation

dickens7
Copy link

.gitignore Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
src/main.c Outdated Show resolved Hide resolved
src/main.c Outdated Show resolved Hide resolved
rockspec/api7-snowflake-2.0-1.rockspec Show resolved Hide resolved
src/main.c Outdated Show resolved Hide resolved
src/main.c Outdated Show resolved Hide resolved
src/main.c Outdated Show resolved Hide resolved
src/main.c Outdated Show resolved Hide resolved
@spacewander spacewander changed the title support configurable number of bits feat: support configurable number of bits Jun 29, 2021
src/main.c Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@@ -0,0 +1,28 @@
package = "snowflake"

Choose a reason for hiding this comment

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

The new package requires a "api7-" prefix, like this one: https://github.com/api7/lua-resty-http/blob/master/api7-lua-resty-http-0.1.0-0.rockspec

Copy link
Author

Choose a reason for hiding this comment

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

Does the c library need to add a prefix? If someone uses snowflake.so, there may still be conflicts

Choose a reason for hiding this comment

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

I think it is fine, nobody will use two snowflake libraries.

Copy link
Author

Choose a reason for hiding this comment

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

I think we can change the default value of SNOWFLAKE_EPOC back to the original value, so that it can still be compatible with the original library.

1609459200000 => 1413817200000
2021-01-01T00:00:00.000Z => 2014-10-20T15:00:00.000Z

@spacewander
Copy link

@membphis

Would you spend some time to make a 2.1 release? Thanks!

@membphis membphis merged commit 2fd0399 into api7:master Jun 30, 2021
@membphis
Copy link

@membphis

Would you spend some time to make a 2.1 release? Thanks!

done

image

@dickens7 dickens7 deleted the supper-conf-bits branch June 30, 2021 04:52
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.

4 participants