Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit f1b0ee2

Browse files
committed
📦 new(proposal:transport) a way to abstruct away the rabbitmq
Solve issue #158 Disconnects rabbitmq and allows addition of kafka or any other transport
1 parent 60007d8 commit f1b0ee2

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

‎gbus/abstractions.go

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import (
66
"time"
77

88
"github.com/sirupsen/logrus"
9-
109
"github.com/streadway/amqp"
1110
)
1211

@@ -284,3 +283,22 @@ type Logged interface {
284283
SetLogger(entry logrus.FieldLogger)
285284
Log() logrus.FieldLogger
286285
}
286+
287+
type Transport interface {
288+
Messaging
289+
Logged
290+
Health
291+
292+
Start() error
293+
Stop() error
294+
295+
RPCChannel() <-chan BusMessage
296+
MessageChannel() <-chan BusMessage
297+
298+
ErrorChan() <-chan error
299+
BackPressureChannel() <-chan bool
300+
301+
ListenOnEvent(exchange, topic string) error
302+
}
303+
304+
type NewTransport func(svcName, connString, DLX string, prefetchCount, maxRetryCount uint, purgeOnStartup, withConfirms bool, logger logrus.FieldLogger) Transport

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /