diff --git a/CHANGELOG.md b/CHANGELOG.md index 70aca03..35b8ac0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # vNext +# v0.37.3-alpha.1 + +- (feature) compatibility to distributed sync service prototype + # v0.37.2 - (bug) Fix output dir of `@fraym/react` package diff --git a/README.md b/README.md index 45d4b17..1095d8d 100644 --- a/README.md +++ b/README.md @@ -39,4 +39,4 @@ This project is licensed under the MIT License. See the [LICENSE](LICENSE) file - dependency version in case a package references another package in this monorepo - add a git tag in the form: `v#.#.#` or `v#.#.#-alpha.#` - Update `RELEASE.md` to contain the new release -- GutHub Actions will automatically publish all packages once everything is pushed +- GitHub Actions will automatically publish all packages once everything is pushed diff --git a/api/grpc/sync/management/lock.proto b/api/grpc/sync/management/lock.proto index 6b845b3..6b957bc 100644 --- a/api/grpc/sync/management/lock.proto +++ b/api/grpc/sync/management/lock.proto @@ -5,6 +5,7 @@ message LockRequest { string lease_id = 1; string tenant_id = 2; repeated string resource = 3; + int32 ttl = 4; } message LockResponse {} @@ -13,6 +14,7 @@ message RLockRequest { string lease_id = 1; string tenant_id = 2; repeated string resource = 3; + int32 ttl = 4; } message RLockResponse {} diff --git a/go/go.mod b/go/go.mod index 90fba99..884a7c2 100644 --- a/go/go.mod +++ b/go/go.mod @@ -5,24 +5,24 @@ go 1.23.5 require ( github.com/Becklyn/go-wire-core v1.4.4 github.com/fraym/golog v0.2.2 - github.com/golang-jwt/jwt/v5 v5.2.2 + github.com/golang-jwt/jwt/v5 v5.3.0 github.com/google/uuid v1.6.0 github.com/graphql-go/graphql v0.8.1 github.com/pkg/errors v0.9.1 - github.com/samber/lo v1.50.0 + github.com/samber/lo v1.51.0 github.com/stretchr/testify v1.10.0 - google.golang.org/grpc v1.72.1 - google.golang.org/protobuf v1.36.6 + google.golang.org/grpc v1.74.2 + google.golang.org/protobuf v1.36.7 ) require ( - github.com/bytedance/sonic v1.13.2 // indirect - github.com/bytedance/sonic/loader v0.2.4 // indirect - github.com/cloudwego/base64x v0.1.5 // indirect + github.com/bytedance/sonic v1.14.0 // indirect + github.com/bytedance/sonic/loader v0.3.0 // indirect + github.com/cloudwego/base64x v0.1.6 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/goccy/go-json v0.10.5 // indirect github.com/joho/godotenv v1.5.1 // indirect - github.com/klauspost/cpuid/v2 v2.2.10 // indirect + github.com/klauspost/cpuid/v2 v2.3.0 // indirect github.com/mattn/go-colorable v0.1.14 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect @@ -30,10 +30,10 @@ require ( github.com/sirupsen/logrus v1.9.3 // indirect github.com/stretchr/objx v0.5.2 // indirect github.com/twitchyliquid64/golang-asm v0.15.1 // indirect - golang.org/x/arch v0.17.0 // indirect - golang.org/x/net v0.40.0 // indirect - golang.org/x/sys v0.33.0 // indirect - golang.org/x/text v0.25.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20250519155744-55703ea1f237 // indirect + golang.org/x/arch v0.20.0 // indirect + golang.org/x/net v0.43.0 // indirect + golang.org/x/sys v0.35.0 // indirect + golang.org/x/text v0.28.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20250818200422-3122310a409c // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go/go.sum b/go/go.sum index 953c954..e18646d 100644 --- a/go/go.sum +++ b/go/go.sum @@ -1,44 +1,38 @@ github.com/Becklyn/go-wire-core v1.4.4 h1:YWRx0qNc7OLP1ZVT6iVgnSTO0WuHohwy8Jo/MOjx0zM= github.com/Becklyn/go-wire-core v1.4.4/go.mod h1:+6TdEwDW5ZSHVvgjbycdAO5IVjSRXF1rsdPjfWTabx0= -github.com/bytedance/sonic v1.13.2 h1:8/H1FempDZqC4VqjptGo14QQlJx8VdZJegxs6wwfqpQ= -github.com/bytedance/sonic v1.13.2/go.mod h1:o68xyaF9u2gvVBuGHPlUVCy+ZfmNNO5ETf1+KgkJhz4= -github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= -github.com/bytedance/sonic/loader v0.2.4 h1:ZWCw4stuXUsn1/+zQDqeE7JKP+QO47tz7QCNan80NzY= -github.com/bytedance/sonic/loader v0.2.4/go.mod h1:N8A3vUdtUebEY2/VQC0MyhYeKUFosQU6FxH2JmUe6VI= -github.com/cloudwego/base64x v0.1.5 h1:XPciSp1xaq2VCSt6lF0phncD4koWyULpl5bUxbfCyP4= -github.com/cloudwego/base64x v0.1.5/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= -github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= +github.com/bytedance/sonic v1.14.0 h1:/OfKt8HFw0kh2rj8N0F6C/qPGRESq0BbaNZgcNXXzQQ= +github.com/bytedance/sonic v1.14.0/go.mod h1:WoEbx8WTcFJfzCe0hbmyTGrfjt8PzNEBdxlNUO24NhA= +github.com/bytedance/sonic/loader v0.3.0 h1:dskwH8edlzNMctoruo8FPTJDF3vLtDT0sXZwvZJyqeA= +github.com/bytedance/sonic/loader v0.3.0/go.mod h1:N8A3vUdtUebEY2/VQC0MyhYeKUFosQU6FxH2JmUe6VI= +github.com/cloudwego/base64x v0.1.6 h1:t11wG9AECkCDk5fMSoxmufanudBtJ+/HemLstXDLI2M= +github.com/cloudwego/base64x v0.1.6/go.mod h1:OFcloc187FXDaYHvrNIjxSe8ncn0OOM8gEHfghB2IPU= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/fraym/golog v0.2.2 h1:anFTBqeKNWkq9dVNE0UeG07UML5tspG6Dpq6B5RohfQ= github.com/fraym/golog v0.2.2/go.mod h1:7KIdUOFy5e67Sty+pxkhGiA6Y1eI2riMsJbDv7QlFzM= -github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= -github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= +github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/goccy/go-json v0.10.5 h1:Fq85nIqj+gXn/S5ahsiTlK3TmC85qgirsdTP/+DeaC4= github.com/goccy/go-json v0.10.5/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/golang-jwt/jwt/v5 v5.2.2 h1:Rl4B7itRWVtYIHFrSNd7vhTiz9UpLdi6gZhZ3wEeDy8= -github.com/golang-jwt/jwt/v5 v5.2.2/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= +github.com/golang-jwt/jwt/v5 v5.3.0 h1:pv4AsKCKKZuqlgs5sUmn4x8UlGa0kEVt/puTpKx9vvo= +github.com/golang-jwt/jwt/v5 v5.3.0/go.mod h1:fxCRLWMO43lRc8nhHWY6LGqRcf+1gQWArsqaEUEa5bE= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= -github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= -github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= +github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/graphql-go/graphql v0.8.1 h1:p7/Ou/WpmulocJeEx7wjQy611rtXGQaAcXGqanuMMgc= github.com/graphql-go/graphql v0.8.1/go.mod h1:nKiHzRM0qopJEwCITUuIsxk9PlVlwIiiI8pnJEhordQ= github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0= github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= -github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= -github.com/klauspost/cpuid/v2 v2.2.10 h1:tBs3QSyvjDyFTq3uoc/9xFpCuOsJQFNPiAhYdw2skhE= -github.com/klauspost/cpuid/v2 v2.2.10/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0= -github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M= -github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/klauspost/cpuid/v2 v2.3.0 h1:S4CRMLnYUhGeDFDqkGriYKdfoFlDnMtqTiI/sFzhA9Y= +github.com/klauspost/cpuid/v2 v2.3.0/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE= github.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8= @@ -46,8 +40,6 @@ github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/ github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= @@ -55,8 +47,8 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN github.com/rs/xid v1.6.0/go.mod h1:7XoLgs4eV+QndskICGsho+ADou8ySMSjJKDIan90Nz0= github.com/rs/zerolog v1.34.0 h1:k43nTLIwcTVQAncfCw4KZ2VY6ukYoZaBPNOE8txlOeY= github.com/rs/zerolog v1.34.0/go.mod h1:bJsvje4Z08ROH4Nhs5iH600c3IkWhwp44iRc54W6wYQ= -github.com/samber/lo v1.50.0 h1:XrG0xOeHs+4FQ8gJR97zDz5uOFMW7OwFWiFVzqopKgY= -github.com/samber/lo v1.50.0/go.mod h1:RjZyNk6WSnUFRKK6EyOhsRJMqft3G+pg7dCWHQCWvsc= +github.com/samber/lo v1.51.0 h1:kysRYLbHy/MB7kQZf5DSN50JHmMsNEdeY24VzJFu7wI= +github.com/samber/lo v1.51.0/go.mod h1:4+MXEGsJzbKGaUEQFKBq2xtfuznW9oz/WrgyzMzRoM0= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -74,38 +66,36 @@ github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= -go.opentelemetry.io/otel v1.34.0 h1:zRLXxLCgL1WyKsPVrgbSdMN4c0FMkDAskSTQP+0hdUY= -go.opentelemetry.io/otel v1.34.0/go.mod h1:OWFPOQ+h4G8xpyjgqo4SxJYdDQ/qmRH+wivy7zzx9oI= -go.opentelemetry.io/otel/metric v1.34.0 h1:+eTR3U0MyfWjRDhmFMxe2SsW64QrZ84AOhvqS7Y+PoQ= -go.opentelemetry.io/otel/metric v1.34.0/go.mod h1:CEDrp0fy2D0MvkXE+dPV7cMi8tWZwX3dmaIhwPOaqHE= -go.opentelemetry.io/otel/sdk v1.34.0 h1:95zS4k/2GOy069d321O8jWgYsW3MzVV+KuSPKp7Wr1A= -go.opentelemetry.io/otel/sdk v1.34.0/go.mod h1:0e/pNiaMAqaykJGKbi+tSjWfNNHMTxoC9qANsCzbyxU= -go.opentelemetry.io/otel/sdk/metric v1.34.0 h1:5CeK9ujjbFVL5c1PhLuStg1wxA7vQv7ce1EK0Gyvahk= -go.opentelemetry.io/otel/sdk/metric v1.34.0/go.mod h1:jQ/r8Ze28zRKoNRdkjCZxfs6YvBTG1+YIqyFVFYec5w= -go.opentelemetry.io/otel/trace v1.34.0 h1:+ouXS2V8Rd4hp4580a8q23bg0azF2nI8cqLYnC8mh/k= -go.opentelemetry.io/otel/trace v1.34.0/go.mod h1:Svm7lSjQD7kG7KJ/MUHPVXSDGz2OX4h0M2jHBhmSfRE= -golang.org/x/arch v0.17.0 h1:4O3dfLzd+lQewptAHqjewQZQDyEdejz3VwgeYwkZneU= -golang.org/x/arch v0.17.0/go.mod h1:bdwinDaKcfZUGpH09BB7ZmOfhalA8lQdzl62l8gGWsk= -golang.org/x/net v0.40.0 h1:79Xs7wF06Gbdcg4kdCCIQArK11Z1hr5POQ6+fIYHNuY= -golang.org/x/net v0.40.0/go.mod h1:y0hY0exeL2Pku80/zKK7tpntoX23cqL3Oa6njdgRtds= +go.opentelemetry.io/otel v1.36.0 h1:UumtzIklRBY6cI/lllNZlALOF5nNIzJVb16APdvgTXg= +go.opentelemetry.io/otel v1.36.0/go.mod h1:/TcFMXYjyRNh8khOAO9ybYkqaDBb/70aVwkNML4pP8E= +go.opentelemetry.io/otel/metric v1.36.0 h1:MoWPKVhQvJ+eeXWHFBOPoBOi20jh6Iq2CcCREuTYufE= +go.opentelemetry.io/otel/metric v1.36.0/go.mod h1:zC7Ks+yeyJt4xig9DEw9kuUFe5C3zLbVjV2PzT6qzbs= +go.opentelemetry.io/otel/sdk v1.36.0 h1:b6SYIuLRs88ztox4EyrvRti80uXIFy+Sqzoh9kFULbs= +go.opentelemetry.io/otel/sdk v1.36.0/go.mod h1:+lC+mTgD+MUWfjJubi2vvXWcVxyr9rmlshZni72pXeY= +go.opentelemetry.io/otel/sdk/metric v1.36.0 h1:r0ntwwGosWGaa0CrSt8cuNuTcccMXERFwHX4dThiPis= +go.opentelemetry.io/otel/sdk/metric v1.36.0/go.mod h1:qTNOhFDfKRwX0yXOqJYegL5WRaW376QbB7P4Pb0qva4= +go.opentelemetry.io/otel/trace v1.36.0 h1:ahxWNuqZjpdiFAyrIoQ4GIiAIhxAunQR6MUoKrsNd4w= +go.opentelemetry.io/otel/trace v1.36.0/go.mod h1:gQ+OnDZzrybY4k4seLzPAWNwVBBVlF2szhehOBB/tGA= +golang.org/x/arch v0.20.0 h1:dx1zTU0MAE98U+TQ8BLl7XsJbgze2WnNKF/8tGp/Q6c= +golang.org/x/arch v0.20.0/go.mod h1:bdwinDaKcfZUGpH09BB7ZmOfhalA8lQdzl62l8gGWsk= +golang.org/x/net v0.43.0 h1:lat02VYK2j4aLzMzecihNvTlJNQUq316m2Mr9rnM6YE= +golang.org/x/net v0.43.0/go.mod h1:vhO1fvI4dGsIjh73sWfUVjj3N7CA9WkKJNQm2svM6Jg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw= -golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= -golang.org/x/text v0.25.0 h1:qVyWApTSYLk/drJRO5mDlNYskwQznZmkpV2c8q9zls4= -golang.org/x/text v0.25.0/go.mod h1:WEdwpYrmk1qmdHvhkSTNPm3app7v4rsT8F2UD6+VHIA= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250519155744-55703ea1f237 h1:cJfm9zPbe1e873mHJzmQ1nwVEeRDU/T1wXDK2kUSU34= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250519155744-55703ea1f237/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A= -google.golang.org/grpc v1.72.1 h1:HR03wO6eyZ7lknl75XlxABNVLLFc2PAb6mHlYh756mA= -google.golang.org/grpc v1.72.1/go.mod h1:wH5Aktxcg25y1I3w7H69nHfXdOG3UiadoBtjh3izSDM= -google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY= -google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY= +golang.org/x/sys v0.35.0 h1:vz1N37gP5bs89s7He8XuIYXpyY0+QlsKmzipCbUtyxI= +golang.org/x/sys v0.35.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/text v0.28.0 h1:rhazDwis8INMIwQ4tpjLDzUhx6RlXqZNPEM0huQojng= +golang.org/x/text v0.28.0/go.mod h1:U8nCwOR8jO/marOQ0QbDiOngZVEBB7MAiitBuMjXiNU= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250818200422-3122310a409c h1:qXWI/sQtv5UKboZ/zUk7h+mrf/lXORyI+n9DKDAusdg= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250818200422-3122310a409c/go.mod h1:gw1tLEfykwDz2ET4a12jcXt4couGAm7IwsVaTy0Sflo= +google.golang.org/grpc v1.74.2 h1:WoosgB65DlWVC9FqI82dGsZhWFNBSLjQ84bjROOpMu4= +google.golang.org/grpc v1.74.2/go.mod h1:CtQ+BGjaAIXHs/5YS3i473GqwBBa1zGQNevxdeBEXrM= +google.golang.org/protobuf v1.36.7 h1:IgrO7UwFQGJdRNXH/sQux4R1Dj1WAKcLElzeeRaXV2A= +google.golang.org/protobuf v1.36.7/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= -gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50= diff --git a/go/proto/sync/managementpb/lock.pb.go b/go/proto/sync/managementpb/lock.pb.go index 04b2410..16c96d6 100644 --- a/go/proto/sync/managementpb/lock.pb.go +++ b/go/proto/sync/managementpb/lock.pb.go @@ -25,6 +25,7 @@ type LockRequest struct { xxx_hidden_LeaseId string `protobuf:"bytes,1,opt,name=lease_id,json=leaseId,proto3"` xxx_hidden_TenantId string `protobuf:"bytes,2,opt,name=tenant_id,json=tenantId,proto3"` xxx_hidden_Resource []string `protobuf:"bytes,3,rep,name=resource,proto3"` + xxx_hidden_Ttl int32 `protobuf:"varint,4,opt,name=ttl,proto3"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -75,6 +76,13 @@ func (x *LockRequest) GetResource() []string { return nil } +func (x *LockRequest) GetTtl() int32 { + if x != nil { + return x.xxx_hidden_Ttl + } + return 0 +} + func (x *LockRequest) SetLeaseId(v string) { x.xxx_hidden_LeaseId = v } @@ -87,12 +95,17 @@ func (x *LockRequest) SetResource(v []string) { x.xxx_hidden_Resource = v } +func (x *LockRequest) SetTtl(v int32) { + x.xxx_hidden_Ttl = v +} + type LockRequest_builder struct { _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. LeaseId string TenantId string Resource []string + Ttl int32 } func (b0 LockRequest_builder) Build() *LockRequest { @@ -102,6 +115,7 @@ func (b0 LockRequest_builder) Build() *LockRequest { x.xxx_hidden_LeaseId = b.LeaseId x.xxx_hidden_TenantId = b.TenantId x.xxx_hidden_Resource = b.Resource + x.xxx_hidden_Ttl = b.Ttl return m0 } @@ -153,6 +167,7 @@ type RLockRequest struct { xxx_hidden_LeaseId string `protobuf:"bytes,1,opt,name=lease_id,json=leaseId,proto3"` xxx_hidden_TenantId string `protobuf:"bytes,2,opt,name=tenant_id,json=tenantId,proto3"` xxx_hidden_Resource []string `protobuf:"bytes,3,rep,name=resource,proto3"` + xxx_hidden_Ttl int32 `protobuf:"varint,4,opt,name=ttl,proto3"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -203,6 +218,13 @@ func (x *RLockRequest) GetResource() []string { return nil } +func (x *RLockRequest) GetTtl() int32 { + if x != nil { + return x.xxx_hidden_Ttl + } + return 0 +} + func (x *RLockRequest) SetLeaseId(v string) { x.xxx_hidden_LeaseId = v } @@ -215,12 +237,17 @@ func (x *RLockRequest) SetResource(v []string) { x.xxx_hidden_Resource = v } +func (x *RLockRequest) SetTtl(v int32) { + x.xxx_hidden_Ttl = v +} + type RLockRequest_builder struct { _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. LeaseId string TenantId string Resource []string + Ttl int32 } func (b0 RLockRequest_builder) Build() *RLockRequest { @@ -230,6 +257,7 @@ func (b0 RLockRequest_builder) Build() *RLockRequest { x.xxx_hidden_LeaseId = b.LeaseId x.xxx_hidden_TenantId = b.TenantId x.xxx_hidden_Resource = b.Resource + x.xxx_hidden_Ttl = b.Ttl return m0 } @@ -536,16 +564,18 @@ var File_sync_management_lock_proto protoreflect.FileDescriptor const file_sync_management_lock_proto_rawDesc = "" + "\n" + - "\x1async/management/lock.proto\x12\x15freym.sync.management\"a\n" + + "\x1async/management/lock.proto\x12\x15freym.sync.management\"s\n" + "\vLockRequest\x12\x19\n" + "\blease_id\x18\x01 \x01(\tR\aleaseId\x12\x1b\n" + "\ttenant_id\x18\x02 \x01(\tR\btenantId\x12\x1a\n" + - "\bresource\x18\x03 \x03(\tR\bresource\"\x0e\n" + - "\fLockResponse\"b\n" + + "\bresource\x18\x03 \x03(\tR\bresource\x12\x10\n" + + "\x03ttl\x18\x04 \x01(\x05R\x03ttl\"\x0e\n" + + "\fLockResponse\"t\n" + "\fRLockRequest\x12\x19\n" + "\blease_id\x18\x01 \x01(\tR\aleaseId\x12\x1b\n" + "\ttenant_id\x18\x02 \x01(\tR\btenantId\x12\x1a\n" + - "\bresource\x18\x03 \x03(\tR\bresource\"\x0f\n" + + "\bresource\x18\x03 \x03(\tR\bresource\x12\x10\n" + + "\x03ttl\x18\x04 \x01(\x05R\x03ttl\"\x0f\n" + "\rRLockResponse\"c\n" + "\rUnlockRequest\x12\x19\n" + "\blease_id\x18\x01 \x01(\tR\aleaseId\x12\x1b\n" + diff --git a/go/streams/internal/subscription/subscriber_test.go b/go/streams/internal/subscription/subscriber_test.go index 682d6fd..b7012e9 100644 --- a/go/streams/internal/subscription/subscriber_test.go +++ b/go/streams/internal/subscription/subscriber_test.go @@ -3,7 +3,6 @@ package subscription_test import ( "context" "errors" - "fmt" "sync" "testing" "time" @@ -47,7 +46,6 @@ func TestSubscriber_Ack(t *testing.T) { ctx, expectedIncludedTopics, func(handleCtx context.Context, event *dto.SubscriptionEvent) error { - fmt.Println("aa") assert.Equal(t, expectedTenantId, event.TenantId) assert.Equal(t, expectedTopic, event.Topic) assert.Equal(t, expectedEventId, event.Id) diff --git a/go/sync/client.go b/go/sync/client.go index f0674d5..cabeb45 100644 --- a/go/sync/client.go +++ b/go/sync/client.go @@ -15,9 +15,9 @@ import ( type Client[T peer.ServiceClient] interface { GetOwnAddress() string IteratePeers(ctx context.Context, handler peer.ConnectionHandlerFn[T]) error - Lock(tenantId string, resource ...string) error + Lock(ttl int32, tenantId string, resource ...string) error Unlock(tenantId string, resource ...string) - RLock(tenantId string, resource ...string) error + RLock(ttl int32, tenantId string, resource ...string) error RUnlock(tenantId string, resource ...string) GetPeerPool() peer.PeerPool[T] Stop() error @@ -76,16 +76,16 @@ func (c *syncClient[T]) IteratePeers(ctx context.Context, handler peer.Connectio return c.peerPool.Iterate(ctx, handler) } -func (c *syncClient[T]) Lock(tenantId string, resource ...string) error { - return c.service.Lock(tenantId, resource) +func (c *syncClient[T]) Lock(ttl int32, tenantId string, resource ...string) error { + return c.service.Lock(ttl, tenantId, resource) } func (c *syncClient[T]) Unlock(tenantId string, resource ...string) { c.service.Unlock(tenantId, resource) } -func (c *syncClient[T]) RLock(tenantId string, resource ...string) error { - return c.service.RLock(tenantId, resource) +func (c *syncClient[T]) RLock(ttl int32, tenantId string, resource ...string) error { + return c.service.RLock(ttl, tenantId, resource) } func (c *syncClient[T]) RUnlock(tenantId string, resource ...string) { diff --git a/go/sync/internal/client/service.go b/go/sync/internal/client/service.go index eb6d4bb..b825e8c 100644 --- a/go/sync/internal/client/service.go +++ b/go/sync/internal/client/service.go @@ -25,8 +25,9 @@ func NewService( appPrefix string, ownIp string, ) (*Service, error) { - retryPause := time.Millisecond * 10000 + retryPause := time.Millisecond * 1000 connection := NewConnection(ctx) + lease := NewLease(ctx, appPrefix, ownIp, client, logger) connection.OnConnect(func() { @@ -59,7 +60,7 @@ func NewService( }, nil } -func (s *Service) Lock(tenant string, resource []string) error { +func (s *Service) Lock(ttl int32, tenant string, resource []string) error { if err := s.connection.WaitForConnect(); err != nil { return err } @@ -69,6 +70,7 @@ func (s *Service) Lock(tenant string, resource []string) error { LeaseId: s.lease.LeaseId(), TenantId: tenant, Resource: resource, + Ttl: ttl, }.Build()) return err }, s.retryPause, 50); err != nil { @@ -108,7 +110,7 @@ func (s *Service) Unlock(tenant string, resource []string) { }() } -func (s *Service) RLock(tenant string, resource []string) error { +func (s *Service) RLock(ttl int32, tenant string, resource []string) error { if err := s.connection.WaitForConnect(); err != nil { return err } @@ -118,6 +120,7 @@ func (s *Service) RLock(tenant string, resource []string) error { LeaseId: s.lease.LeaseId(), TenantId: tenant, Resource: resource, + Ttl: ttl, }.Build()) return err }, s.retryPause, 50); err != nil { diff --git a/go/sync/mock_client.go b/go/sync/mock_client.go index 8942c21..8f57d88 100644 --- a/go/sync/mock_client.go +++ b/go/sync/mock_client.go @@ -19,16 +19,16 @@ func (c *MockClient[T]) IteratePeers(ctx context.Context, handler peer.Connectio return c.Called(ctx, handler).Error(0) } -func (c *MockClient[T]) Lock(tenantId string, resource ...string) error { - return c.Called(tenantId, resource).Error(0) +func (c *MockClient[T]) Lock(ttl int32, tenantId string, resource ...string) error { + return c.Called(ttl, tenantId, resource).Error(0) } func (c *MockClient[T]) Unlock(tenantId string, resource ...string) { c.Called(tenantId, resource) } -func (c *MockClient[T]) RLock(tenantId string, resource ...string) error { - return c.Called(tenantId, resource).Error(0) +func (c *MockClient[T]) RLock(ttl int32, tenantId string, resource ...string) error { + return c.Called(ttl, tenantId, resource).Error(0) } func (c *MockClient[T]) RUnlock(tenantId string, resource ...string) { diff --git a/js/package-lock.json b/js/package-lock.json index 878d21a..d1abf70 100644 --- a/js/package-lock.json +++ b/js/package-lock.json @@ -369,9 +369,9 @@ } }, "node_modules/@eslint/config-array/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", "dev": true, "license": "MIT", "dependencies": { @@ -439,10 +439,11 @@ } }, "node_modules/@eslint/eslintrc/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", "dev": true, + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -496,19 +497,32 @@ } }, "node_modules/@eslint/plugin-kit": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.3.1.tgz", - "integrity": "sha512-0J+zgWxHN+xXONWIyPWKFMgVuJoZuGiIFu8yxk7RJjxkzpGmyja5wRFqZIVtjDVOQpV+Rw0iOAjYPE2eQyjr0w==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.3.5.tgz", + "integrity": "sha512-Z5kJ+wU3oA7MMIqVR9tyZRtjYPr4OC004Q4Rw7pgOKUOKkJfZ3O24nz3WYfGRpMDNmcOi3TwQOmgm7B7Tpii0w==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@eslint/core": "^0.14.0", + "@eslint/core": "^0.15.2", "levn": "^0.4.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, + "node_modules/@eslint/plugin-kit/node_modules/@eslint/core": { + "version": "0.15.2", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.15.2.tgz", + "integrity": "sha512-78Md3/Rrxh83gCxoUc0EiciuOHsIITzLy53m3d9UyiW8y9Dj2D29FeETqyKA+BRK76tnTp6RXWb3pCay8Oyomg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.15" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, "node_modules/@fraym/auth": { "resolved": "auth", "link": true @@ -781,13 +795,14 @@ } }, "node_modules/@inquirer/core": { - "version": "10.1.9", - "resolved": "https://registry.npmjs.org/@inquirer/core/-/core-10.1.9.tgz", - "integrity": "sha512-sXhVB8n20NYkUBfDYgizGHlpRVaCRjtuzNZA6xpALIUbkgfd2Hjz+DfEN6+h1BRnuxw0/P4jCIMjMsEOAMwAJw==", + "version": "10.1.15", + "resolved": "https://registry.npmjs.org/@inquirer/core/-/core-10.1.15.tgz", + "integrity": "sha512-8xrp836RZvKkpNbVvgWUlxjT4CraKk2q+I3Ksy+seI2zkcE+y6wNs1BVhgcv8VyImFecUhdQrYLdW32pAjwBdA==", "dev": true, + "license": "MIT", "dependencies": { - "@inquirer/figures": "^1.0.11", - "@inquirer/type": "^3.0.5", + "@inquirer/figures": "^1.0.13", + "@inquirer/type": "^3.0.8", "ansi-escapes": "^4.3.2", "cli-width": "^4.1.0", "mute-stream": "^2.0.0", @@ -820,14 +835,15 @@ } }, "node_modules/@inquirer/editor": { - "version": "4.2.9", - "resolved": "https://registry.npmjs.org/@inquirer/editor/-/editor-4.2.9.tgz", - "integrity": "sha512-8HjOppAxO7O4wV1ETUlJFg6NDjp/W2NP5FB9ZPAcinAlNT4ZIWOLe2pUVwmmPRSV0NMdI5r/+lflN55AwZOKSw==", + "version": "4.2.17", + "resolved": "https://registry.npmjs.org/@inquirer/editor/-/editor-4.2.17.tgz", + "integrity": "sha512-r6bQLsyPSzbWrZZ9ufoWL+CztkSatnJ6uSxqd6N+o41EZC51sQeWOzI6s5jLb+xxTWxl7PlUppqm8/sow241gg==", "dev": true, + "license": "MIT", "dependencies": { - "@inquirer/core": "^10.1.9", - "@inquirer/type": "^3.0.5", - "external-editor": "^3.1.0" + "@inquirer/core": "^10.1.15", + "@inquirer/external-editor": "^1.0.1", + "@inquirer/type": "^3.0.8" }, "engines": { "node": ">=18" @@ -863,11 +879,54 @@ } } }, + "node_modules/@inquirer/external-editor": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@inquirer/external-editor/-/external-editor-1.0.1.tgz", + "integrity": "sha512-Oau4yL24d2B5IL4ma4UpbQigkVhzPDXLoqy1ggK4gnHg/stmkffJE4oOXHXF3uz0UEpywG68KcyXsyYpA1Re/Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "chardet": "^2.1.0", + "iconv-lite": "^0.6.3" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/external-editor/node_modules/chardet": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-2.1.0.tgz", + "integrity": "sha512-bNFETTG/pM5ryzQ9Ad0lJOTa6HWD/YsScAR3EnCPZRPlQh77JocYktSHOUHelyhm8IARL+o4c4F1bP5KVOjiRA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@inquirer/external-editor/node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "dev": true, + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/@inquirer/figures": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/@inquirer/figures/-/figures-1.0.11.tgz", - "integrity": "sha512-eOg92lvrn/aRUqbxRyvpEWnrvRuTYRifixHkYVpJiygTgVSBIHDqLh0SrMQXkafvULg3ck11V7xvR+zcgvpHFw==", + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/@inquirer/figures/-/figures-1.0.13.tgz", + "integrity": "sha512-lGPVU3yO9ZNqA7vTYz26jny41lE7yoQansmqdMLBEfqaGsmdg7V3W9mK9Pvb5IL4EVZ9GnSDGMO/cJXud5dMaw==", "dev": true, + "license": "MIT", "engines": { "node": ">=18" } @@ -1035,10 +1094,11 @@ } }, "node_modules/@inquirer/type": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/@inquirer/type/-/type-3.0.5.tgz", - "integrity": "sha512-ZJpeIYYueOz/i/ONzrfof8g89kNdO2hjGuvULROo3O8rlB2CRtSseE5KeirnyE4t/thAn/EwvS/vuQeJCn+NZg==", + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/@inquirer/type/-/type-3.0.8.tgz", + "integrity": "sha512-lg9Whz8onIHRthWaN1Q9EGLa/0LFJjyM8mEUbL1eTi6yMGvBf8gvyDLtxSXztQsxMvhxxNpJYrwa1YHdq+w4Jw==", "dev": true, + "license": "MIT", "engines": { "node": ">=18" }, @@ -2989,9 +3049,10 @@ } }, "node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" } @@ -4242,9 +4303,9 @@ } }, "node_modules/eslint-plugin-react/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", "dev": true, "license": "MIT", "dependencies": { @@ -4319,10 +4380,11 @@ } }, "node_modules/eslint/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", "dev": true, + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" diff --git a/js/proto/src/sync/management/lock.ts b/js/proto/src/sync/management/lock.ts index 7f32b42..69ee364 100644 --- a/js/proto/src/sync/management/lock.ts +++ b/js/proto/src/sync/management/lock.ts @@ -10,6 +10,7 @@ export interface LockRequest { leaseId: string; tenantId: string; resource: string[]; + ttl: number; } export interface LockResponse {} @@ -18,6 +19,7 @@ export interface RLockRequest { leaseId: string; tenantId: string; resource: string[]; + ttl: number; } export interface RLockResponse {} @@ -39,7 +41,7 @@ export interface RUnlockRequest { export interface RUnlockResponse {} function createBaseLockRequest(): LockRequest { - return { leaseId: "", tenantId: "", resource: [] }; + return { leaseId: "", tenantId: "", resource: [], ttl: 0 }; } export const LockRequest: MessageFns = { @@ -53,6 +55,9 @@ export const LockRequest: MessageFns = { for (const v of message.resource) { writer.uint32(26).string(v!); } + if (message.ttl !== 0) { + writer.uint32(32).int32(message.ttl); + } return writer; }, @@ -87,6 +92,14 @@ export const LockRequest: MessageFns = { message.resource.push(reader.string()); continue; } + case 4: { + if (tag !== 32) { + break; + } + + message.ttl = reader.int32(); + continue; + } } if ((tag & 7) === 4 || tag === 0) { break; @@ -103,6 +116,7 @@ export const LockRequest: MessageFns = { resource: globalThis.Array.isArray(object?.resource) ? object.resource.map((e: any) => globalThis.String(e)) : [], + ttl: isSet(object.ttl) ? globalThis.Number(object.ttl) : 0, }; }, @@ -117,6 +131,9 @@ export const LockRequest: MessageFns = { if (message.resource?.length) { obj.resource = message.resource; } + if (message.ttl !== 0) { + obj.ttl = Math.round(message.ttl); + } return obj; }, @@ -128,6 +145,7 @@ export const LockRequest: MessageFns = { message.leaseId = object.leaseId ?? ""; message.tenantId = object.tenantId ?? ""; message.resource = object.resource?.map(e => e) || []; + message.ttl = object.ttl ?? 0; return message; }, }; @@ -176,7 +194,7 @@ export const LockResponse: MessageFns = { }; function createBaseRLockRequest(): RLockRequest { - return { leaseId: "", tenantId: "", resource: [] }; + return { leaseId: "", tenantId: "", resource: [], ttl: 0 }; } export const RLockRequest: MessageFns = { @@ -190,6 +208,9 @@ export const RLockRequest: MessageFns = { for (const v of message.resource) { writer.uint32(26).string(v!); } + if (message.ttl !== 0) { + writer.uint32(32).int32(message.ttl); + } return writer; }, @@ -224,6 +245,14 @@ export const RLockRequest: MessageFns = { message.resource.push(reader.string()); continue; } + case 4: { + if (tag !== 32) { + break; + } + + message.ttl = reader.int32(); + continue; + } } if ((tag & 7) === 4 || tag === 0) { break; @@ -240,6 +269,7 @@ export const RLockRequest: MessageFns = { resource: globalThis.Array.isArray(object?.resource) ? object.resource.map((e: any) => globalThis.String(e)) : [], + ttl: isSet(object.ttl) ? globalThis.Number(object.ttl) : 0, }; }, @@ -254,6 +284,9 @@ export const RLockRequest: MessageFns = { if (message.resource?.length) { obj.resource = message.resource; } + if (message.ttl !== 0) { + obj.ttl = Math.round(message.ttl); + } return obj; }, @@ -265,6 +298,7 @@ export const RLockRequest: MessageFns = { message.leaseId = object.leaseId ?? ""; message.tenantId = object.tenantId ?? ""; message.resource = object.resource?.map(e => e) || []; + message.ttl = object.ttl ?? 0; return message; }, }; diff --git a/js/version b/js/version index 8570a3a..bba51a5 100644 --- a/js/version +++ b/js/version @@ -1 +1 @@ -0.37.2 +0.37.3-alpha-1