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

improve: Fixed int64 overflow problems on JavaScript #316

Merged
merged 1 commit into from
Nov 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,7 @@ build-linux-wasm-layotto:
docker build --rm -t ${BUILD_IMAGE} build/contrib/builder/image/faas
docker run --rm -v $(shell pwd):/go/src/${PROJECT_NAME} -w /go/src/${PROJECT_NAME} ${BUILD_IMAGE} go build -tags wasmer -o layotto /go/src/${PROJECT_NAME}/cmd/layotto

license-checker:
docker run -it --rm -v $(pwd):/github/workspace apache/skywalking-eyes header fix

.PHONY: build
211 changes: 211 additions & 0 deletions configs/config_integration_redis_etcd.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,211 @@
{
"servers": [
{
"default_log_path": "stdout",
"default_log_level": "DEBUG",
"routers": [
{
"router_config_name": "http_router",
"virtual_hosts": [
{
"name": "http_host",
"domains": [
"*"
],
"routers": [
{
"match": {
"headers": [
{
"name": "id",
"value": "HelloService:1.0"
}
]
},
"route": {
"cluster_name": "http_server"
}
}
]
}
]
},
{
"router_config_name": "actuator_dont_need_router"
}
],
"listeners": [
{
"name": "grpc",
"address": "127.0.0.1:34904",
"bind_port": true,
"filter_chains": [
{
"filters": [
{
"type": "grpc",
"config": {
"server_name": "runtime",
"grpc_config": {
"rpcs": {
"mosn": {
"config": {
"channel": [
{
"size": 16,
"protocol": "http",
"listener": "egress_runtime_http"
}
]
}
}
},
"hellos": {
"helloworld": {
"hello": "greeting"
}
},
"bindings": {
"http": {
"metadata": {
"url": "https://registry.npmmirror.com/layotto/0.0.0"
}
}
},
"config_stores": {
"etcd": {
"address": [
"127.0.0.1:2379"
],
"timeout": "10"
}
},
"state": {
"redis": {
"metadata": {
"redisHost": "localhost:6380",
"redisPassword": ""
}
}
},
"sequencer": {
"etcd": {
"metadata": {
"endpoints": "localhost:2379",
"segmentCacheEnable": "false",
"segmentStep": "1",
"username": "",
"password": "",
"dialTimeout": "5"
}
},
"redis": {
"metadata": {
"redisHost": "127.0.0.1:6380",
"redisPassword": ""
}
}
},
"lock": {
"etcd": {
"metadata": {
"endpoints": "localhost:2379",
"username": "",
"password": "",
"keyPrefixPath": "/lock",
"dialTimeout": "5"
}
},
"redis": {
"metadata": {
"redisHost": "localhost:6380",
"redisPassword": ""
}
}
},
"pub_subs": {
"redis": {
"metadata": {
"redisHost": "localhost:6380",
"redisPassword": ""
}
}
},
"app": {
"app_id": "app1",
"grpc_callback_port": 9999
}
}
}
}
]
}
]
},
{
"name": "actuator",
"address": "127.0.0.1:34999",
"bind_port": true,
"filter_chains": [
{
"filters": [
{
"type": "proxy",
"config": {
"downstream_protocol": "Http1",
"upstream_protocol": "Http1",
"router_config_name": "actuator_dont_need_router"
}
}
]
}
],
"stream_filters": [
{
"type": "actuator_filter"
}
]
},
{
"name": "egress_runtime_http",
"type": "egress",
"address": "0.0.0.0:12221",
"bind_port": true,
"network": "tcp",
"filter_chains": [
{
"filters": [
{
"type": "proxy",
"config": {
"downstream_protocol": "Http1",
"name": "proxy_config",
"router_config_name": "http_router",
"upstream_protocol": "Http1"
}
}
]
}
]
}
]
}
],
"cluster_manager": {
"tls_context": {},
"clusters": [
{
"name": "http_server",
"type": "SIMPLE",
"lb_type": "LB_RANDOM",
"hosts": [
{
"address": "127.0.0.1:8889",
"hostname": "downstream_machine1",
"weight": 1
}
]
}
]
}
}
3 changes: 2 additions & 1 deletion spec/proto/runtime/v1/runtime.proto
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,8 @@ message SequencerOptions {

message GetNextIdResponse{
// The next unique id
int64 next_id = 1;
// Fixed int64 overflow problems on JavaScript https://github.com/improbable-eng/ts-protoc-gen#gotchas
int64 next_id = 1 [jstype = JS_STRING];
}

message TryLockRequest {
Expand Down