From 77f17cd217213450efed8ab287d79f9af13de386 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Jochum?= Date: Wed, 26 Mar 2025 12:45:45 +0100 Subject: [PATCH 1/7] feat(README): beta status --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 81eae53..30db089 100644 --- a/README.md +++ b/README.md @@ -4,10 +4,11 @@ Go Orb is a framework for distributed systems development, it can be seen as the The core of go-orb has been completely refactored, to support the removal of reflect and introduction of wire. -## In active Development +## BETA Status -While its possible to try out go-orb currently, it is in active development and not ready for production use. -Please have a look at our [roadmap](https://github.com/orgs/go-orb/projects/1) for more details. +Go Orb is in BETA status, backward incompatible changes will only be introduced with minor (v0.4.0) releases. + +Please try out go-orb, report any issues you find and spread the word. ## Overview From 6ad0044c8dc891a7130f08f2c6ef3b9e372661ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Jochum?= Date: Wed, 26 Mar 2025 12:56:14 +0100 Subject: [PATCH 2/7] fix(README):, per entrypoint handlers and middlewares are no more a thing. --- README.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/README.md b/README.md index 30db089..89c6ac8 100644 --- a/README.md +++ b/README.md @@ -103,10 +103,6 @@ service1: plugin: grpc insecure: true reflection: false - handlers: - - ImOnlyOnGRPC - middlewares: - - ImAGRPCSpecificMiddlware - name: http plugin: http From 6ac6927cfaabee392c9785d7265da796b9755cff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Jochum?= Date: Wed, 26 Mar 2025 12:57:20 +0100 Subject: [PATCH 3/7] fix(README): entrypoints are now a map in config. --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 89c6ac8..e069bf4 100644 --- a/README.md +++ b/README.md @@ -70,7 +70,7 @@ service1: middlewares: - middleware-1 entrypoints: - - name: grpc + grpc: plugin: grpc insecure: true reflection: false @@ -94,21 +94,21 @@ service1: - middleware-1 - middleware-2 entrypoints: - - name: hertzhttp + hertzhttp: plugin: hertz http2: false insecure: true - - name: grpc + grpc: plugin: grpc insecure: true reflection: false - - name: http + http: plugin: http insecure: true - - name: drpc + drpc: plugin: drpc client: middlewares: From 8631166af1ea85d51359004c45a30e3968033aff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Jochum?= Date: Wed, 26 Mar 2025 13:03:45 +0100 Subject: [PATCH 4/7] fix(README): its Request not Call. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e069bf4..59593cb 100644 --- a/README.md +++ b/README.md @@ -155,7 +155,7 @@ go-orb has support for sending nearly anything you throw in as `application/json #### pre encoded / proxy ```go -resp , err := client.Call[map[string]any](context.Background(), clientDi, "org.orb.svc.hello", "Say.Hello", `{"name": "Alex"}`, client.WithContentType(codecs.MimeJSON)) +resp , err := client.Request[map[string]any](context.Background(), clientDi, "org.orb.svc.hello", "Say.Hello", `{"name": "Alex"}`, client.WithContentType(codecs.MimeJSON)) ``` #### map[string]any{} @@ -164,7 +164,7 @@ resp , err := client.Call[map[string]any](context.Background(), clientDi, "org.o req := make(map[string]any) req["name"] = "Alex" -resp , err := client.Call[map[string]any](context.Background(), clientDi, "org.orb.svc.hello", "Say.Hello", req, client.WithContentType(codecs.MimeJSON)) +resp , err := client.Request[map[string]any](context.Background(), clientDi, "org.orb.svc.hello", "Say.Hello", req, client.WithContentType(codecs.MimeJSON)) ``` #### Structured logging From 398df54cc119d59bd1d47a78072b7e8420e8f543 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Jochum?= Date: Sat, 5 Apr 2025 03:49:02 +0200 Subject: [PATCH 5/7] feat(codecs): Add MimeMsgpack --- codecs/mime.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/codecs/mime.go b/codecs/mime.go index 06fd255..46c3386 100644 --- a/codecs/mime.go +++ b/codecs/mime.go @@ -14,3 +14,6 @@ const MimeTOML = "application/toml" // MimeXML is the mime type for XML. const MimeXML = "application/xml" + +// MimeMsgpack is the mime type for MessagePack. +const MimeMsgpack = "application/msgpack" From 600d74dc8f8a496fb288bba1096d13b69b2dbf8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Jochum?= Date: Sat, 5 Apr 2025 03:49:24 +0200 Subject: [PATCH 6/7] chore(kvstore): Add context as first argument everywhere --- kvstore/kvstore.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/kvstore/kvstore.go b/kvstore/kvstore.go index b0b87af..3d9115d 100644 --- a/kvstore/kvstore.go +++ b/kvstore/kvstore.go @@ -52,27 +52,27 @@ type KVStore interface { // Get takes a key, database, table and optional GetOptions. It returns the Record or an error. // Leave database and/or table empty to use the defaults. - Get(key, database, table string, opts ...GetOption) ([]Record, error) + Get(ctx context.Context, key, database, table string, opts ...GetOption) ([]Record, error) // Set takes a key, database, table and data, and optional SetOptions. // Leave database and/or table empty to use the defaults. - Set(key, database, table string, data []byte, opts ...SetOption) error + Set(ctx context.Context, key, database, table string, data []byte, opts ...SetOption) error // Purge takes a key, database and table and purges it. // Leave database and/or table empty to use the defaults. - Purge(key, database, table string) error + Purge(ctx context.Context, key, database, table string) error // Keys returns any keys that match, or an empty list with no error if none matched. // Leave database and/or table empty to use the defaults. - Keys(database, table string, opts ...KeysOption) ([]string, error) + Keys(ctx context.Context, database, table string, opts ...KeysOption) ([]string, error) // DropTable drops the table. // Leave database and/or table empty to use the defaults. - DropTable(database, table string) error + DropTable(ctx context.Context, database, table string) error // DropDatabase drops the database. // Leave database empty to use the default. - DropDatabase(database string) error + DropDatabase(ctx context.Context, database string) error } // WatchOp represents the type of Watch operation (Update, Delete). It is a From 7ca2e976a1d410573c997486fffc7909769ac33a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Jochum?= Date: Sat, 5 Apr 2025 03:50:28 +0200 Subject: [PATCH 7/7] fix(README): Its Request not Call --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 59593cb..2e4094e 100644 --- a/README.md +++ b/README.md @@ -133,7 +133,7 @@ New: req := HelloRequest{Name: "test"} // Look at resp, it's now returned as a result. -resp , err := client.Call[HelloResponse](context.Background(), clientDi, "org.orb.svc.hello", "Say.Hello", &req) +resp , err := client.Request[HelloResponse](context.Background(), clientDi, "org.orb.svc.hello", "Say.Hello", &req) ``` Old: