diff options
| author | matthieu <matthieu@developershouse.xyz> | 2021-09-03 22:17:51 +0400 |
|---|---|---|
| committer | matthieu <matthieu@developershouse.xyz> | 2021-09-03 22:17:51 +0400 |
| commit | c1b170dfec41937fbc4ca14e90de768ec176fec0 (patch) | |
| tree | ca3b6f0128850a5ec52548119ec4d7b2151da579 /novalet/lib/internal_transporter.go | |
| parent | 3ef87c0b6cac546d74d1e37b13bfbac3c8504305 (diff) | |
sync project
Diffstat (limited to 'novalet/lib/internal_transporter.go')
| -rw-r--r-- | novalet/lib/internal_transporter.go | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/novalet/lib/internal_transporter.go b/novalet/lib/internal_transporter.go deleted file mode 100644 index 87e708e..0000000 --- a/novalet/lib/internal_transporter.go +++ /dev/null @@ -1,37 +0,0 @@ -package lib - -import ( - "github.com/discordnova/nova/common/gateway" - "github.com/rs/zerolog/log" -) - -type InternalTransporter struct { - pullChannel chan []byte - pushChannel chan gateway.PushData -} - -// NewRabbitMqTransporter creates a rabbitmq transporter using a given url -func NewInternalTransporter() (gateway.Transporter, error) { - log.Info().Msg("using the memory transporter") - - pullChannel, pushChannel := make(chan []byte), make(chan gateway.PushData) - - go func() { - for { - // TODO(matthieu): Implement push channel for the internal transporter. - <-pushChannel - } - }() - - return &InternalTransporter{ - pullChannel: pullChannel, - pushChannel: pushChannel, - }, nil -} - -func (t InternalTransporter) PushChannel() chan gateway.PushData { - return t.pushChannel -} -func (t InternalTransporter) PullChannel() chan []byte { - return t.pullChannel -} |
