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: add sequencer api component with snowflake algorithm #767

Merged
merged 70 commits into from
Oct 20, 2022
Merged
Show file tree
Hide file tree
Changes from 58 commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
ff8f87b
add snowflake sequencer
OOOOlh Aug 16, 2022
73f1899
add snowflake sequencer
OOOOlh Aug 17, 2022
0bbf50b
add snowflake sequencer
OOOOlh Aug 17, 2022
7b1c10a
add snowflake sequencer
OOOOlh Aug 17, 2022
61c7e98
Merge branch 'main' into snowflake
OOOOlh Aug 17, 2022
8fe2c05
Merge branch 'main' into snowflake
OOOOlh Aug 20, 2022
a609830
add snowflake sequencer api
OOOOlh Aug 20, 2022
6d4957a
Merge remote-tracking branch 'origin/snowflake' into snowflake
OOOOlh Aug 20, 2022
5b41905
add snowflake sequencer api
OOOOlh Aug 21, 2022
f8020f2
Merge branch 'main' into snowflake
OOOOlh Aug 25, 2022
7b63cc7
Merge branch 'main' into snowflake
OOOOlh Aug 25, 2022
a1e5ac1
add comments
OOOOlh Sep 2, 2022
0750361
Merge branch 'main' into snowflake
OOOOlh Sep 2, 2022
fa0e59a
add UT
OOOOlh Sep 5, 2022
e058a4d
add snowflake sequencer api
OOOOlh Sep 7, 2022
47e9100
add snowflake sequencer api
OOOOlh Sep 7, 2022
c82fe3f
add snowflake sequencer api
OOOOlh Sep 7, 2022
df7ec3f
add snowflake sequencer api
OOOOlh Sep 7, 2022
ef9e724
Merge branch 'main' into snowflake
seeflood Sep 8, 2022
0730731
Merge branch 'main' into snowflake
Xunzhuo Sep 14, 2022
d3ed224
Merge branch 'main' into snowflake
OOOOlh Sep 18, 2022
7b0b0a9
fix some bugs
OOOOlh Sep 20, 2022
60efcce
fix
OOOOlh Sep 20, 2022
ef9f588
fix
OOOOlh Sep 20, 2022
251a53c
fix
OOOOlh Sep 20, 2022
024fc69
add UT
OOOOlh Sep 21, 2022
d693845
add UT
OOOOlh Sep 21, 2022
a54e3ab
fix
OOOOlh Sep 25, 2022
f119a3c
Merge branch 'main' into snowflake
OOOOlh Sep 25, 2022
bcca825
Merge branch 'main' into snowflake
seeflood Sep 26, 2022
57c9766
add docs
OOOOlh Sep 29, 2022
b12add8
Merge remote-tracking branch 'origin/snowflake' into snowflake
OOOOlh Sep 29, 2022
66a7a6b
Merge branch 'main' into snowflake
OOOOlh Sep 29, 2022
90bd7cb
fix
OOOOlh Sep 29, 2022
b0d6086
Merge remote-tracking branch 'origin/snowflake' into snowflake
OOOOlh Sep 29, 2022
628eb41
fix
OOOOlh Oct 8, 2022
b9e8716
fix
OOOOlh Oct 8, 2022
f53dc31
fix
OOOOlh Oct 8, 2022
61a0d4c
fix
OOOOlh Oct 8, 2022
3a9dbbf
Merge branch 'main' into snowflake
OOOOlh Oct 8, 2022
46a493d
fix
OOOOlh Oct 9, 2022
fccc5d5
fix
OOOOlh Oct 9, 2022
6161a08
fix
OOOOlh Oct 9, 2022
f3e1f6e
fix
OOOOlh Oct 9, 2022
a9e1d6d
fix
OOOOlh Oct 9, 2022
2cb3f0a
fix
OOOOlh Oct 9, 2022
96aa53f
fix
OOOOlh Oct 9, 2022
9bc32a0
fix
OOOOlh Oct 9, 2022
73c2046
fix
OOOOlh Oct 10, 2022
68274b1
fix
OOOOlh Oct 10, 2022
c0c62f0
Merge branch 'main' into snowflake
OOOOlh Oct 10, 2022
0c26f5d
upload image to cdn
seeflood Oct 11, 2022
4583596
fix
OOOOlh Oct 13, 2022
e81c8c6
Merge remote-tracking branch 'origin/snowflake' into snowflake
OOOOlh Oct 13, 2022
b72eb17
fix
OOOOlh Oct 13, 2022
a16d23b
fix
OOOOlh Oct 13, 2022
3f38ad5
fix
OOOOlh Oct 13, 2022
0736007
Merge branch 'main' into snowflake
OOOOlh Oct 13, 2022
bdbf2c1
fix
OOOOlh Oct 15, 2022
22825d0
Merge remote-tracking branch 'origin/snowflake' into snowflake
OOOOlh Oct 15, 2022
cbabcc9
Merge branch 'main' into snowflake
OOOOlh Oct 15, 2022
ce6ac14
fix
OOOOlh Oct 17, 2022
437f3b8
Merge branch 'snowflake' of https://github.com/OOOOlh/layotto into sn…
OOOOlh Oct 17, 2022
15602af
fix
OOOOlh Oct 18, 2022
f8c207d
fix
OOOOlh Oct 18, 2022
e320a76
Merge branch 'main' into snowflake
seeflood Oct 19, 2022
a8657d1
Merge branch 'main' into snowflake
seeflood Oct 19, 2022
0ba7e98
fix
OOOOlh Oct 19, 2022
e008380
Merge branch 'snowflake' of https://github.com/OOOOlh/layotto into sn…
OOOOlh Oct 19, 2022
301b3c1
fix
OOOOlh Oct 20, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions cmd/layotto/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ import (
sequencer_mongo "mosn.io/layotto/components/sequencer/mongo"
sequencer_mysql "mosn.io/layotto/components/sequencer/mysql"
sequencer_redis "mosn.io/layotto/components/sequencer/redis"
sequencer_snowflake "mosn.io/layotto/components/sequencer/snowflake"
sequencer_zookeeper "mosn.io/layotto/components/sequencer/zookeeper"

// Actuator
Expand Down Expand Up @@ -442,6 +443,9 @@ func NewRuntimeGrpcServer(data json.RawMessage, opts ...grpc.ServerOption) (mgrp
runtime_sequencer.NewFactory("mysql", func() sequencer.Store {
return sequencer_mysql.NewMySQLSequencer(log.DefaultLogger)
}),
runtime_sequencer.NewFactory("snowflake", func() sequencer.Store {
OOOOlh marked this conversation as resolved.
Show resolved Hide resolved
return sequencer_snowflake.NewSnowFlakeSequencer(log.DefaultLogger)
}),
),
// secretstores
runtime.WithSecretStoresFactory(
Expand Down
4 changes: 4 additions & 0 deletions cmd/layotto_multiple_api/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ import (
sequencer_mongo "mosn.io/layotto/components/sequencer/mongo"
sequencer_mysql "mosn.io/layotto/components/sequencer/mysql"
sequencer_redis "mosn.io/layotto/components/sequencer/redis"
sequencer_snowflake "mosn.io/layotto/components/sequencer/snowflake"
sequencer_zookeeper "mosn.io/layotto/components/sequencer/zookeeper"

// Actuator
Expand Down Expand Up @@ -457,6 +458,9 @@ func NewRuntimeGrpcServer(data json.RawMessage, opts ...grpc.ServerOption) (mgrp
runtime_sequencer.NewFactory("mysql", func() sequencer.Store {
return sequencer_mysql.NewMySQLSequencer(log.DefaultLogger)
}),
runtime_sequencer.NewFactory("snowflake", func() sequencer.Store {
return sequencer_snowflake.NewSnowFlakeSequencer(log.DefaultLogger)
}),
),
// secretstores
runtime.WithSecretStoresFactory(
Expand Down
4 changes: 4 additions & 0 deletions cmd/layotto_without_xds/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ import (
sequencer_inmemory "mosn.io/layotto/components/sequencer/in-memory"
sequencer_mongo "mosn.io/layotto/components/sequencer/mongo"
sequencer_redis "mosn.io/layotto/components/sequencer/redis"
sequencer_snowflake "mosn.io/layotto/components/sequencer/snowflake"
sequencer_zookeeper "mosn.io/layotto/components/sequencer/zookeeper"

// Actuator
Expand Down Expand Up @@ -427,6 +428,9 @@ func NewRuntimeGrpcServer(data json.RawMessage, opts ...grpc.ServerOption) (mgrp
runtime_sequencer.NewFactory("in-memory", func() sequencer.Store {
return sequencer_inmemory.NewInMemorySequencer()
}),
runtime_sequencer.NewFactory("snowflake", func() sequencer.Store {
return sequencer_snowflake.NewSnowFlakeSequencer(log.DefaultLogger)
}),
),
// secretstores
runtime.WithSecretStoresFactory(
Expand Down
1 change: 1 addition & 0 deletions components/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ require (
github.com/dapr/components-contrib v1.5.2
github.com/dapr/kit v0.0.2-0.20210614175626-b9074b64d233
github.com/go-redis/redis/v8 v8.8.0
github.com/go-sql-driver/mysql v1.5.0
github.com/go-zookeeper/zk v1.0.2
github.com/golang/mock v1.6.0
github.com/google/uuid v1.3.0
Expand Down
1 change: 1 addition & 0 deletions components/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,7 @@ github.com/go-redis/redis/v8 v8.8.0/go.mod h1:F7resOH5Kdug49Otu24RjHWwgK7u9AmtqW
github.com/go-resty/resty/v2 v2.6.0/go.mod h1:PwvJS6hvaPkjtjNg9ph+VrSD92bi5Zq73w/BIH7cC3Q=
github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=
github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=
github.com/go-sql-driver/mysql v1.5.0 h1:ozyZYNQW3x3HtqT1jira07DN2PArx2v7/mN66gGcHOs=
github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk=
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
Expand Down
Loading