Skip to content

Commit

Permalink
feat: rename as go-dcp-couchbase
Browse files Browse the repository at this point in the history
  • Loading branch information
erayarslan committed Jul 11, 2023
1 parent d21b016 commit c95b0cd
Show file tree
Hide file tree
Showing 10 changed files with 28 additions and 25 deletions.
4 changes: 2 additions & 2 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
project_name: go-couchbase-connect-couchbase
project_name: go-dcp-couchbase

release:
github:
name: go-couchbase-connect-couchbase
name: go-dcp-couchbase
owner: Trendyol

before:
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Contribution Guidelines

Thank you for your interest in go-couchbase-connect-couchbase!
Thank you for your interest in go-dcp-couchbase!

This project welcomes contributions and suggestions. Most contributions require you to signoff on your commits. Please
follow the instructions provided below.
Expand Down Expand Up @@ -36,7 +36,7 @@ If you find your issue already exists, make relevant comments and add your react
2. For bugs
Check it's not an environment issue. For example, if your configurations correct or network connections is alive.

### Contributing to go-couchbase-connect-couchbase
### Contributing to go-dcp-couchbase

Pull Requests
All contributions come through pull requests. To submit a proposed change, we recommend following this workflow:
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Go Couchbase Connect Couchbase
# Go Dcp Couchbase

[![Go Reference](https://pkg.go.dev/badge/github.com/Trendyol/go-couchbase-connect-couchbase.svg)](https://pkg.go.dev/github.com/Trendyol/go-couchbase-connect-couchbase) [![Go Report Card](https://goreportcard.com/badge/github.com/Trendyol/go-couchbase-connect-couchbase)](https://goreportcard.com/report/github.com/Trendyol/go-couchbase-connect-couchbase)
[![Go Reference](https://pkg.go.dev/badge/github.com/Trendyol/go-dcp-couchbase.svg)](https://pkg.go.dev/github.com/Trendyol/go-dcp-couchbase) [![Go Report Card](https://goreportcard.com/badge/github.com/Trendyol/go-dcp-couchbase)](https://goreportcard.com/report/github.com/Trendyol/go-dcp-couchbase)

**Go Couchbase Connect Couchbase** streams documents from Couchbase Database Change Protocol (DCP) and writes to
**Go Dcp Couchbase** streams documents from Couchbase Database Change Protocol (DCP) and writes to
Couchbase bucket in near real-time.

## Features
Expand All @@ -26,11 +26,11 @@ func defaultMapper(event couchbase.Event) []couchbase.CBActionDocument {
}

func main() {
c, err := gocouchbaseconnectcouchbase.NewConnector(&config.Config{
c, err := dcpcouchbase.NewConnector(&config.Config{
Dcp: dcpClientConfig.Dcp{
Hosts: []string{"localhost:8091"},
Username: "user",
Password: "password",
Password: "123456",
BucketName: "dcp-test",
Dcp: dcpClientConfig.ExternalDcp{
Group: dcpClientConfig.DCPGroup{
Expand All @@ -42,7 +42,7 @@ func main() {
},
Metadata: dcpClientConfig.Metadata{
Config: map[string]string{
"bucket": "checkpoint-bucket-name",
"bucket": "dcp-test-meta",
"scope": "_default",
"collection": "_default",
},
Expand Down Expand Up @@ -95,7 +95,7 @@ For DCP related metrics see [also](https://github.com/Trendyol/go-dcp-client#exp

## Contributing

Go Couchbase Connect Couchbase is always open for direct contributions. For more information please check
Go Dcp Couchbase is always open for direct contributions. For more information please check
our [Contribution Guideline document](./CONTRIBUTING.md).

## License
Expand Down
7 changes: 4 additions & 3 deletions connector.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package gocouchbaseconnectcouchbase
package dcpcouchbase

import (
"errors"

"github.com/Trendyol/go-couchbase-connect-couchbase/config"
"github.com/Trendyol/go-couchbase-connect-couchbase/couchbase"
"github.com/Trendyol/go-dcp-couchbase/config"
"github.com/Trendyol/go-dcp-couchbase/couchbase"

godcpclient "github.com/Trendyol/go-dcp-client"
dcpClientConfig "github.com/Trendyol/go-dcp-client/config"
"github.com/Trendyol/go-dcp-client/logger"
Expand Down
3 changes: 2 additions & 1 deletion couchbase/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ import (
"os"
"time"

"github.com/Trendyol/go-dcp-couchbase/config"

"github.com/Trendyol/go-dcp-client/couchbase"

"github.com/Trendyol/go-couchbase-connect-couchbase/config"
"github.com/Trendyol/go-dcp-client/logger"
"github.com/couchbase/gocbcore/v10"
)
Expand Down
3 changes: 2 additions & 1 deletion couchbase/processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import (
"errors"
"time"

"github.com/Trendyol/go-couchbase-connect-couchbase/config"
"github.com/Trendyol/go-dcp-couchbase/config"

"github.com/Trendyol/go-dcp-client/logger"
"github.com/Trendyol/go-dcp-client/models"
"github.com/couchbase/gocbcore/v10"
Expand Down
4 changes: 2 additions & 2 deletions example/struct-config/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ module example

go 1.20

replace github.com/Trendyol/go-couchbase-connect-couchbase => ./../..
replace github.com/Trendyol/go-dcp-couchbase => ./../..

require (
github.com/Trendyol/go-couchbase-connect-couchbase v0.0.0
github.com/Trendyol/go-dcp-client v0.0.62
github.com/Trendyol/go-dcp-couchbase v0.0.0
)

require (
Expand Down
8 changes: 4 additions & 4 deletions example/struct-config/main.go
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
package main

import (
"github.com/Trendyol/go-dcp-couchbase"
"time"

gocouchbaseconnectcouchbase "github.com/Trendyol/go-couchbase-connect-couchbase"
"github.com/Trendyol/go-couchbase-connect-couchbase/config"
dcpClientConfig "github.com/Trendyol/go-dcp-client/config"
"github.com/Trendyol/go-dcp-client/logger"
"github.com/Trendyol/go-dcp-couchbase/config"
)

func main() {
c, err := gocouchbaseconnectcouchbase.NewConnector(&config.Config{
c, err := dcpcouchbase.NewConnector(&config.Config{
Dcp: dcpClientConfig.Dcp{
Hosts: []string{"localhost:8091"},
Username: "user",
Expand Down Expand Up @@ -42,7 +42,7 @@ func main() {
BatchSizeLimit: 10,
RequestTimeoutMs: 1000 * 10,
},
}, gocouchbaseconnectcouchbase.DefaultMapper, logger.Log, logger.ErrorLog)
}, dcpcouchbase.DefaultMapper, logger.Log, logger.ErrorLog)
if err != nil {
panic(err)
}
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/Trendyol/go-couchbase-connect-couchbase
module github.com/Trendyol/go-dcp-couchbase

go 1.20

Expand Down
4 changes: 2 additions & 2 deletions mapper.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package gocouchbaseconnectcouchbase
package dcpcouchbase

import "github.com/Trendyol/go-couchbase-connect-couchbase/couchbase"
import "github.com/Trendyol/go-dcp-couchbase/couchbase"

type Mapper func(event couchbase.Event) []couchbase.CBActionDocument

Expand Down

0 comments on commit c95b0cd

Please sign in to comment.