From 376d7ba75d8a69187b0fe3793d6ab7775573e484 Mon Sep 17 00:00:00 2001 From: SoXX Date: Sat, 26 Oct 2024 21:15:02 +0200 Subject: [PATCH] feat: implemented generic algorithm --- README.md | 4 ++-- go.mod | 2 +- pkg/plug/grpc.go | 2 +- pkg/plug/otlp.go | 2 +- pkg/plug/server.go | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index e664d62..b789a1c 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Anthrove Plug SDK is a Golang-based Software Development Kit (SDK) that provides To install the Anthrove Plug SDK, you will need to have Go installed on your system. You can then use the go get command to fetch the SDK: ```bash -go get git.anthrove.art/Anthrove/plug-sdk/v4 +go get git.anthrove.art/Anthrove/plug-sdk/v5 ``` ## Usage @@ -141,7 +141,7 @@ func main() { log.Fatal(err) } - plug.SetTaskExecutionFunction(service.YourTaskFunction) + plug.SetTaskExecutionFunction(service.plugInterface) plug.SetGetMessageExecutionFunction(service.YourMessageFunction) err = plug.Listen(ctx, ":8080", source) if err != nil { diff --git a/go.mod b/go.mod index fc0bae3..456d5a4 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module git.anthrove.art/Anthrove/plug-sdk/v4 +module git.anthrove.art/Anthrove/plug-sdk/v5 go 1.23.0 diff --git a/pkg/plug/grpc.go b/pkg/plug/grpc.go index 2099747..c0a34c1 100644 --- a/pkg/plug/grpc.go +++ b/pkg/plug/grpc.go @@ -8,7 +8,7 @@ import ( "git.anthrove.art/Anthrove/otter-space-sdk/v4/pkg/database" "git.anthrove.art/Anthrove/otter-space-sdk/v4/pkg/models" - gRPC "git.anthrove.art/Anthrove/plug-sdk/v4/pkg/grpc" + gRPC "git.anthrove.art/Anthrove/plug-sdk/v5/pkg/grpc" gonanoid "github.com/matoous/go-nanoid/v2" log "github.com/sirupsen/logrus" "go.opentelemetry.io/otel/attribute" diff --git a/pkg/plug/otlp.go b/pkg/plug/otlp.go index 670e40e..9d33eae 100644 --- a/pkg/plug/otlp.go +++ b/pkg/plug/otlp.go @@ -3,7 +3,7 @@ package plug import ( "context" - "git.anthrove.art/Anthrove/plug-sdk/v4/pkg/telemetry" + "git.anthrove.art/Anthrove/plug-sdk/v5/pkg/telemetry" log "github.com/sirupsen/logrus" "go.opentelemetry.io/otel/codes" ) diff --git a/pkg/plug/server.go b/pkg/plug/server.go index 6e329c6..f01026e 100644 --- a/pkg/plug/server.go +++ b/pkg/plug/server.go @@ -5,7 +5,7 @@ import ( "net" "git.anthrove.art/Anthrove/otter-space-sdk/v4/pkg/models" - pb "git.anthrove.art/Anthrove/plug-sdk/v4/pkg/grpc" + pb "git.anthrove.art/Anthrove/plug-sdk/v5/pkg/grpc" log "github.com/sirupsen/logrus" "go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc" "go.opentelemetry.io/otel" @@ -15,7 +15,7 @@ import ( "google.golang.org/protobuf/types/known/timestamppb" ) -var tracer = otel.Tracer("git.anthrove.art/Anthrove/plug-sdk/v4/pkg/plug") +var tracer = otel.Tracer("git.anthrove.art/Anthrove/plug-sdk/v5/pkg/plug") type Message struct { Title string