Skip to content

Commit

Permalink
Migrate to Go Bolo
Browse files Browse the repository at this point in the history
  • Loading branch information
albertosouza committed Jul 21, 2023
1 parent 7f9ff29 commit f76522e
Show file tree
Hide file tree
Showing 5 changed files with 127 additions and 176 deletions.
4 changes: 2 additions & 2 deletions ClientInterface.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package msgbroker

import "github.com/go-catupiry/catu"
import "github.com/go-bolo/bolo"

type Client interface {
Init(app catu.App) error
Init(app bolo.App) error
// Register a handler function to receive the new messages
// Now we support only one method for each queues
Subscribe(queueName string, handler MessageHandler) (string, error)
Expand Down
6 changes: 2 additions & 4 deletions MSGBrokerPlugin.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package msgbroker

import (
"github.com/go-catupiry/catu"
)
import "github.com/go-bolo/bolo"

type PluginCfgs struct {
Client Client
Expand Down Expand Up @@ -30,6 +28,6 @@ func (p *MSGBrokerPlugin) GetName() string {
return p.Name
}

func (p *MSGBrokerPlugin) Init(app catu.App) error {
func (p *MSGBrokerPlugin) Init(app bolo.App) error {
return p.Client.Init(app)
}
9 changes: 3 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Message Broker / queues for Go Catupiry Framework
# Message Broker / queues for Go Bolo Framework

## Congiguration

Expand All @@ -21,7 +21,7 @@ import (
"fmt"
"os"

"github.com/go-catupiry/catu"
"github.com/go-bolo/bolo"
"github.com/sirupsen/logrus"
"gitlab.com/www.monitordomercado.com.br/mm/msgbroker"
"gitlab.com/www.monitordomercado.com.br/mm/msgbroker_nsq"
Expand All @@ -33,7 +33,7 @@ func main() {

var err error

app := catu.Init()
app := bolo.Init()

// Register the NSQ plugin to load its feature in the app
app.RegisterPlugin(msgbroker.NewPlugin(&msgbroker.PluginCfgs{
Expand All @@ -51,9 +51,6 @@ func main() {

func handleExecutionError(err error) {
if err != nil {
logrus.WithFields(logrus.Fields{
"error": fmt.Sprintf("%+v\n", err),
}).Error("main handleExecutionError")
os.Exit(1)
}
}
Expand Down
76 changes: 36 additions & 40 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,54 +1,50 @@
module github.com/go-catupiry/msgbroker
module github.com/go-bolo/msgbroker

go 1.17
go 1.20

require github.com/go-catupiry/catu v0.0.12
replace github.com/go-bolo/bolo => /home/a/projects/go-bolo/bolo

require (
github.com/Masterminds/goutils v1.1.1 // indirect
github.com/Masterminds/semver v1.5.0 // indirect
github.com/Masterminds/sprig v2.22.0+incompatible // indirect
github.com/aymerick/douceur v0.2.0 // indirect
github.com/cockroachdb/apd v1.1.0 // indirect
github.com/cuducos/go-cnpj v0.0.1 // indirect
github.com/go-catupiry/query_parser_to_db v0.0.3 // indirect
github.com/go-playground/locales v0.14.0 // indirect
github.com/go-playground/universal-translator v0.18.0 // indirect
github.com/go-playground/validator/v10 v10.10.1 // indirect
github.com/go-sql-driver/mysql v1.6.0 // indirect
github.com/gabriel-vasile/mimetype v1.4.2 // indirect
github.com/go-bolo/bolo v0.0.0-00010101000000-000000000000 // indirect
github.com/go-bolo/clock v0.0.3 // indirect
github.com/go-bolo/query_parser_to_db v1.0.0 // indirect
github.com/go-playground/locales v0.14.1 // indirect
github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/go-playground/validator/v10 v10.14.1 // indirect
github.com/go-sql-driver/mysql v1.7.1 // indirect
github.com/golang-jwt/jwt v3.2.2+incompatible // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/gookit/event v1.0.5 // indirect
github.com/gookit/event v1.1.1 // indirect
github.com/gorilla/css v1.0.0 // indirect
github.com/gosimple/slug v1.12.0 // indirect
github.com/gosimple/slug v1.13.1 // indirect
github.com/gosimple/unidecode v1.0.1 // indirect
github.com/huandu/xstrings v1.3.2 // indirect
github.com/imdario/mergo v0.3.12 // indirect
github.com/jinzhu/inflection v1.0.0 // indirect
github.com/jinzhu/now v1.1.5 // indirect
github.com/joho/godotenv v1.4.0 // indirect
github.com/labstack/echo/v4 v4.7.2 // indirect
github.com/labstack/gommon v0.3.1 // indirect
github.com/leekchan/accounting v1.0.0 // indirect
github.com/leodido/go-urn v1.2.1 // indirect
github.com/mattn/go-colorable v0.1.12 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/mattn/go-sqlite3 v1.14.12 // indirect
github.com/microcosm-cc/bluemonday v1.0.18 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/joho/godotenv v1.5.1 // indirect
github.com/labstack/echo/v4 v4.11.1 // indirect
github.com/labstack/gommon v0.4.0 // indirect
github.com/leodido/go-urn v1.2.4 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.19 // indirect
github.com/mattn/go-sqlite3 v1.14.17 // indirect
github.com/microcosm-cc/bluemonday v1.0.25 // indirect
github.com/shopspring/decimal v1.3.1 // indirect
github.com/sirupsen/logrus v1.8.1 // indirect
github.com/spf13/cast v1.4.1 // indirect
github.com/spf13/cast v1.5.1 // indirect
github.com/tdewolff/minify/v2 v2.12.7 // indirect
github.com/tdewolff/parse/v2 v2.6.6 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/valyala/fasttemplate v1.2.1 // indirect
golang.org/x/crypto v0.0.0-20220321153916-2c7772ba3064 // indirect
golang.org/x/net v0.0.0-20220225172249-27dd8689420f // indirect
golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8 // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/time v0.0.0-20220224211638-0e9765cccd65 // indirect
gorm.io/driver/mysql v1.3.2 // indirect
gorm.io/driver/sqlite v1.3.1 // indirect
gorm.io/gorm v1.23.3 // indirect
github.com/valyala/fasttemplate v1.2.2 // indirect
go.uber.org/atomic v1.11.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.24.0 // indirect
golang.org/x/crypto v0.11.0 // indirect
golang.org/x/net v0.12.0 // indirect
golang.org/x/sys v0.10.0 // indirect
golang.org/x/text v0.11.0 // indirect
golang.org/x/time v0.3.0 // indirect
gorm.io/driver/mysql v1.5.1 // indirect
gorm.io/driver/sqlite v1.5.2 // indirect
gorm.io/gorm v1.25.2 // indirect
)
Loading

0 comments on commit f76522e

Please sign in to comment.