usedatabrew/pglogicalstream

Consider move /internal/replication package out of /internal

Closed this issue ยท 5 comments

Hi,

Thank you for your work published. I was looking for initial snapshot feature and found out your project.

The problem I experience is that the Basic usage example doesn't work.

I have changed it a bit but it still fails to compile because in the code:

pgStream.OnMessage(
  func(message replication.Wal2JsonChanges) {
  // ...
  }
)

the package replication is defined inside /internal what makes the callback function impossible to use:

package pglogicalstream

import "github.com/usedatabrew/pglogicalstream/internal/replication"

type OnMessage = func(message replication.Wal2JsonChanges)

Hey @gekpp
Thanks for your issue. I'll take a look tomorrow.

I'm still not able to import "github.com/usedatabrew/pglogicalstream/messages"

imports
        github.com/usedatabrew/pglogicalstream/messages: cannot find module providing package github.com/usedatabrew/pglogicalstream/messages

I'm still not able to import "github.com/usedatabrew/pglogicalstream/messages"

imports
        github.com/usedatabrew/pglogicalstream/messages: cannot find module providing package github.com/usedatabrew/pglogicalstream/messages

Hey @whygee-dev
Can you share your code here? I'll take a look today.

I'm still not able to import "github.com/usedatabrew/pglogicalstream/messages"

imports
        github.com/usedatabrew/pglogicalstream/messages: cannot find module providing package github.com/usedatabrew/pglogicalstream/messages

Hey @whygee-dev Can you share your code here? I'll take a look today.

๐Ÿ‘‹ its exactly the same code as simple/main.go

I'm still not able to import "github.com/usedatabrew/pglogicalstream/messages"

imports
        github.com/usedatabrew/pglogicalstream/messages: cannot find module providing package github.com/usedatabrew/pglogicalstream/messages

Hey @whygee-dev Can you share your code here? I'll take a look today.

๐Ÿ‘‹ its exactly the same code as simple/main.go

Hey @whygee-dev

It should work now.
Please, use v0.0.26

go get github.com/usedatabrew/pglogicalstream@v0.0.26