From f27edfcdeeb1f4f9d68936b6ed00f0c8f61fec36 Mon Sep 17 00:00:00 2001 From: anthdm Date: Sun, 7 Jan 2024 11:35:19 +0100 Subject: [PATCH] Project raptor is born --- cmd/api/main.go | 8 ++++---- cmd/cli/main.go | 8 ++++---- cmd/wasmserver/main.go | 6 +++--- examples/go/main.go | 2 +- go.mod | 8 +++----- go.sum | 6 ------ pkg/actrs/runtime.go | 12 ++++++------ pkg/actrs/wasmserver.go | 6 +++--- pkg/api/server.go | 6 +++--- pkg/client/client.go | 4 ++-- pkg/shared/shared.go | 2 +- pkg/storage/memory.go | 2 +- pkg/storage/redis.go | 2 +- pkg/storage/sql.go | 2 +- pkg/storage/storage.go | 2 +- proto/types.proto | 2 +- sdk/sdk.go | 2 +- 17 files changed, 36 insertions(+), 44 deletions(-) diff --git a/cmd/api/main.go b/cmd/api/main.go index 55843ab..8c284f8 100644 --- a/cmd/api/main.go +++ b/cmd/api/main.go @@ -8,10 +8,10 @@ import ( "os" "time" - "github.com/anthdm/run/pkg/api" - "github.com/anthdm/run/pkg/config" - "github.com/anthdm/run/pkg/storage" - "github.com/anthdm/run/pkg/types" + "github.com/anthdm/raptor/pkg/api" + "github.com/anthdm/raptor/pkg/config" + "github.com/anthdm/raptor/pkg/storage" + "github.com/anthdm/raptor/pkg/types" "github.com/google/uuid" "github.com/tetratelabs/wazero" ) diff --git a/cmd/cli/main.go b/cmd/cli/main.go index 5928986..6ee597a 100644 --- a/cmd/cli/main.go +++ b/cmd/cli/main.go @@ -9,10 +9,10 @@ import ( "os" "strings" - "github.com/anthdm/run/pkg/api" - "github.com/anthdm/run/pkg/client" - "github.com/anthdm/run/pkg/config" - "github.com/anthdm/run/pkg/types" + "github.com/anthdm/raptor/pkg/api" + "github.com/anthdm/raptor/pkg/client" + "github.com/anthdm/raptor/pkg/config" + "github.com/anthdm/raptor/pkg/types" "github.com/google/uuid" ) diff --git a/cmd/wasmserver/main.go b/cmd/wasmserver/main.go index 97b66b7..729c8fb 100644 --- a/cmd/wasmserver/main.go +++ b/cmd/wasmserver/main.go @@ -11,9 +11,9 @@ import ( "github.com/anthdm/hollywood/actor" "github.com/anthdm/hollywood/cluster" "github.com/anthdm/hollywood/remote" - "github.com/anthdm/run/pkg/actrs" - "github.com/anthdm/run/pkg/config" - "github.com/anthdm/run/pkg/storage" + "github.com/anthdm/raptor/pkg/actrs" + "github.com/anthdm/raptor/pkg/config" + "github.com/anthdm/raptor/pkg/storage" ) func main() { diff --git a/examples/go/main.go b/examples/go/main.go index 8825a42..5009b18 100644 --- a/examples/go/main.go +++ b/examples/go/main.go @@ -3,7 +3,7 @@ package main import ( "net/http" - run "github.com/anthdm/run/sdk" + run "github.com/anthdm/raptor/sdk" "github.com/go-chi/chi" ) diff --git a/go.mod b/go.mod index 0e6f383..1b21e97 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/anthdm/run +module github.com/anthdm/raptor go 1.21.0 @@ -6,8 +6,10 @@ require ( github.com/anthdm/hollywood v0.0.0-20231230200740-54133c9bd2b4 github.com/go-chi/chi/v5 v5.0.11 github.com/google/uuid v1.5.0 + github.com/lib/pq v1.10.9 github.com/redis/go-redis/v9 v9.3.1 github.com/stealthrocket/net v0.2.1 + github.com/tetratelabs/wazero v1.6.0 github.com/vmihailenco/msgpack/v5 v5.4.1 google.golang.org/protobuf v1.30.0 ) @@ -17,10 +19,7 @@ require ( github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/klauspost/cpuid/v2 v2.0.9 // indirect - github.com/lib/pq v1.10.9 // indirect - github.com/mattn/go-sqlite3 v1.14.19 // indirect github.com/planetscale/vtprotobuf v0.4.0 // indirect - github.com/tetratelabs/wazero v1.6.0 // indirect github.com/zeebo/errs v1.2.2 // indirect github.com/zeebo/xxh3 v1.0.2 // indirect golang.org/x/exp v0.0.0-20231214170342-aacd6d4b4611 // indirect @@ -32,7 +31,6 @@ require ( require ( github.com/go-chi/chi v1.5.5 - github.com/go-sql-driver/mysql v1.7.1 github.com/pelletier/go-toml/v2 v2.1.1 github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect golang.org/x/net v0.17.0 // indirect diff --git a/go.sum b/go.sum index a7e0031..6d30486 100644 --- a/go.sum +++ b/go.sum @@ -15,8 +15,6 @@ github.com/go-chi/chi v1.5.5 h1:vOB/HbEMt9QqBqErz07QehcOKHaWFtuj87tTDVz2qXE= github.com/go-chi/chi v1.5.5/go.mod h1:C9JqLr3tIYjDOZpzn+BCuxY8z8vmca43EeMgyZt7irw= github.com/go-chi/chi/v5 v5.0.11 h1:BnpYbFZ3T3S1WMpD79r7R5ThWX40TaFB7L31Y8xqSwA= github.com/go-chi/chi/v5 v5.0.11/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8= -github.com/go-sql-driver/mysql v1.7.1 h1:lUIinVbN1DY0xBg0eMOzmmtGoHwWBbvnWubQUrtU8EI= -github.com/go-sql-driver/mysql v1.7.1/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= @@ -29,8 +27,6 @@ github.com/klauspost/cpuid/v2 v2.0.9 h1:lgaqFMSdTdQYdZ04uHyN2d/eKdOMyi2YLSvlQIBF github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= -github.com/mattn/go-sqlite3 v1.14.19 h1:fhGleo2h1p8tVChob4I9HpmVFIAkKGpiukdrgQbWfGI= -github.com/mattn/go-sqlite3 v1.14.19/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg= github.com/pelletier/go-toml/v2 v2.1.1 h1:LWAJwfNvjQZCFIDKWYQaM62NcYeYViCmWIwmOStowAI= github.com/pelletier/go-toml/v2 v2.1.1/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= github.com/planetscale/vtprotobuf v0.4.0 h1:NEI+g4woRaAZgeZ3sAvbtyvMBRjIv5kE7EWYQ8m4JwY= @@ -48,8 +44,6 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/tetratelabs/wazero v1.1.0 h1:EByoAhC+QcYpwSZJSs/aV0uokxPwBgKxfiokSUwAknQ= -github.com/tetratelabs/wazero v1.1.0/go.mod h1:wYx2gNRg8/WihJfSDxA1TIL8H+GkfLYm+bIfbblu9VQ= github.com/tetratelabs/wazero v1.6.0 h1:z0H1iikCdP8t+q341xqepY4EWvHEw8Es7tlqiVzlP3g= github.com/tetratelabs/wazero v1.6.0/go.mod h1:0U0G41+ochRKoPKCJlh0jMg1CHkyfK8kDqiirMmKY8A= github.com/vmihailenco/msgpack/v5 v5.4.1 h1:cQriyiUvjTwOHg8QZaPihLWeRAAVoCpE00IUPn0Bjt8= diff --git a/pkg/actrs/runtime.go b/pkg/actrs/runtime.go index d6794f0..bc7a4a5 100644 --- a/pkg/actrs/runtime.go +++ b/pkg/actrs/runtime.go @@ -10,12 +10,12 @@ import ( "time" "github.com/anthdm/hollywood/actor" - "github.com/anthdm/run/pkg/runtime" - "github.com/anthdm/run/pkg/shared" - "github.com/anthdm/run/pkg/spidermonkey" - "github.com/anthdm/run/pkg/storage" - "github.com/anthdm/run/pkg/types" - "github.com/anthdm/run/proto" + "github.com/anthdm/raptor/pkg/runtime" + "github.com/anthdm/raptor/pkg/shared" + "github.com/anthdm/raptor/pkg/spidermonkey" + "github.com/anthdm/raptor/pkg/storage" + "github.com/anthdm/raptor/pkg/types" + "github.com/anthdm/raptor/proto" "github.com/google/uuid" "github.com/tetratelabs/wazero" diff --git a/pkg/actrs/wasmserver.go b/pkg/actrs/wasmserver.go index 4395c76..f2c068b 100644 --- a/pkg/actrs/wasmserver.go +++ b/pkg/actrs/wasmserver.go @@ -7,9 +7,9 @@ import ( "github.com/anthdm/hollywood/actor" "github.com/anthdm/hollywood/cluster" - "github.com/anthdm/run/pkg/shared" - "github.com/anthdm/run/pkg/storage" - "github.com/anthdm/run/proto" + "github.com/anthdm/raptor/pkg/shared" + "github.com/anthdm/raptor/pkg/storage" + "github.com/anthdm/raptor/proto" "github.com/google/uuid" ) diff --git a/pkg/api/server.go b/pkg/api/server.go index 30ea6fa..04000e2 100644 --- a/pkg/api/server.go +++ b/pkg/api/server.go @@ -7,9 +7,9 @@ import ( "io" "net/http" - "github.com/anthdm/run/pkg/config" - "github.com/anthdm/run/pkg/storage" - "github.com/anthdm/run/pkg/types" + "github.com/anthdm/raptor/pkg/config" + "github.com/anthdm/raptor/pkg/storage" + "github.com/anthdm/raptor/pkg/types" "github.com/go-chi/chi/v5" "github.com/google/uuid" ) diff --git a/pkg/client/client.go b/pkg/client/client.go index 4f22f32..ea23fc4 100644 --- a/pkg/client/client.go +++ b/pkg/client/client.go @@ -7,8 +7,8 @@ import ( "io" "net/http" - "github.com/anthdm/run/pkg/api" - "github.com/anthdm/run/pkg/types" + "github.com/anthdm/raptor/pkg/api" + "github.com/anthdm/raptor/pkg/types" "github.com/google/uuid" ) diff --git a/pkg/shared/shared.go b/pkg/shared/shared.go index 25ef0ac..2fa8f87 100644 --- a/pkg/shared/shared.go +++ b/pkg/shared/shared.go @@ -8,7 +8,7 @@ import ( "strconv" "strings" - "github.com/anthdm/run/proto" + "github.com/anthdm/raptor/proto" ) func ParseRuntimeHTTPResponse(in string) (resp string, status int, err error) { diff --git a/pkg/storage/memory.go b/pkg/storage/memory.go index 12807d5..e2fa66e 100644 --- a/pkg/storage/memory.go +++ b/pkg/storage/memory.go @@ -4,7 +4,7 @@ import ( "fmt" "sync" - "github.com/anthdm/run/pkg/types" + "github.com/anthdm/raptor/pkg/types" "github.com/google/uuid" ) diff --git a/pkg/storage/redis.go b/pkg/storage/redis.go index 652ff73..cac4360 100644 --- a/pkg/storage/redis.go +++ b/pkg/storage/redis.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/anthdm/run/pkg/types" + "github.com/anthdm/raptor/pkg/types" "github.com/google/uuid" "github.com/redis/go-redis/v9" "github.com/vmihailenco/msgpack/v5" diff --git a/pkg/storage/sql.go b/pkg/storage/sql.go index 6b2f998..8c39795 100644 --- a/pkg/storage/sql.go +++ b/pkg/storage/sql.go @@ -6,7 +6,7 @@ import ( "fmt" "strings" - "github.com/anthdm/run/pkg/types" + "github.com/anthdm/raptor/pkg/types" "github.com/google/uuid" _ "github.com/lib/pq" ) diff --git a/pkg/storage/storage.go b/pkg/storage/storage.go index 0acf117..0b1c682 100644 --- a/pkg/storage/storage.go +++ b/pkg/storage/storage.go @@ -1,7 +1,7 @@ package storage import ( - "github.com/anthdm/run/pkg/types" + "github.com/anthdm/raptor/pkg/types" "github.com/google/uuid" ) diff --git a/proto/types.proto b/proto/types.proto index 2031261..ea00b3b 100644 --- a/proto/types.proto +++ b/proto/types.proto @@ -1,6 +1,6 @@ syntax = "proto3"; package proto; -option go_package = "github.com/anthdm/run/proto"; +option go_package = "github.com/anthdm/raptor/proto"; message HTTPRequest { bytes Body = 1; diff --git a/sdk/sdk.go b/sdk/sdk.go index 0fea4ec..3ea3960 100644 --- a/sdk/sdk.go +++ b/sdk/sdk.go @@ -9,7 +9,7 @@ import ( "os" "strings" - "github.com/anthdm/run/proto" + "github.com/anthdm/raptor/proto" //_ "github.com/stealthrocket/net/http" prot "google.golang.org/protobuf/proto" )