Trendyol / go-dcp

The Go implementation of the Couchbase DCP with various features
MIT License
85 stars 15 forks source link

feat: extract connectionBufferSize DcpBufferSize to interface for support kb,mb size units #71

Closed Abdulsametileri closed 1 year ago

Abdulsametileri commented 1 year ago

with this pr, users can easily specify connectionBufferSize, dcp.bufferSize value as kb mb values or use raw bytes

for example,

metadata:
  config:
    bucket: cbes-checkpoint-ProductCenter
    connectionBufferSize: 5mb // support size unit

dcp:
  connectionTimeout: 10s
  connectionBufferSize: 15mb // support size unit
  bufferSize: 20mb // support size unit
  listener:
    bufferSize: 1000 <-- this is internal channel buffer size, its not reasonable to support
  group:
    name: it_will_be_overriden
    membership:
      type: couchbase