Skip to content

Commit

Permalink
feat: expose dcp client on connector
Browse files Browse the repository at this point in the history
  • Loading branch information
erayarslan committed Jul 20, 2024
1 parent 040d186 commit bffca4e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions connector.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import (
"os"
"time"

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

"github.com/Trendyol/go-dcp/helpers"

"github.com/Trendyol/go-dcp"
Expand All @@ -25,6 +27,7 @@ import (
type Connector interface {
Start()
Close()
GetDcpClient() dcpCouchbase.Client
GetMapperProcessLatencyMs() int64
}

Expand Down Expand Up @@ -54,6 +57,10 @@ func (c *connector) Close() {
c.processor.Close()
}

func (c *connector) GetDcpClient() dcpCouchbase.Client {
return c.dcp.GetClient()
}

func (c *connector) GetMapperProcessLatencyMs() int64 {
return c.metric.MapperProcessLatencyMs
}
Expand Down

0 comments on commit bffca4e

Please sign in to comment.