first commit
This commit is contained in:
19
internal/pubsub/publisher.go
Normal file
19
internal/pubsub/publisher.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package pubsub
|
||||
|
||||
import (
|
||||
"database/sql"
|
||||
|
||||
"github.com/ThreeDotsLabs/watermill"
|
||||
sqlwatermill "github.com/ThreeDotsLabs/watermill-sql/pkg/sql"
|
||||
"github.com/ThreeDotsLabs/watermill/message"
|
||||
)
|
||||
|
||||
func NewPublisher(db *sql.DB, logger watermill.LoggerAdapter) (message.Publisher, error) {
|
||||
return sqlwatermill.NewPublisher(
|
||||
db,
|
||||
sqlwatermill.PublisherConfig{
|
||||
SchemaAdapter: sqlwatermill.DefaultPostgreSQLSchema{},
|
||||
},
|
||||
logger,
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user