diff --git a/go.mod b/go.mod index f9a68137..ead415fa 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( github.com/Knetic/govaluate v3.0.0+incompatible github.com/aws/aws-sdk-go v1.44.116 github.com/caarlos0/env v3.5.0+incompatible - github.com/devtron-labs/common-lib v0.18.1-0.20241003071930-acfb6a1b1e7f + github.com/devtron-labs/common-lib v0.18.1-0.20250410084127-3148eb610369 github.com/go-resty/resty/v2 v2.7.0 github.com/joho/godotenv v1.4.0 github.com/otiai10/copy v1.7.0 diff --git a/go.sum b/go.sum index 73610737..3a62b559 100644 --- a/go.sum +++ b/go.sum @@ -57,8 +57,8 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/devtron-labs/common-lib v0.18.1-0.20241003071930-acfb6a1b1e7f h1:5PDhi7bAc9r67OpwXZDG7y1n9lhHX26Ke4Y9VE9+kd8= -github.com/devtron-labs/common-lib v0.18.1-0.20241003071930-acfb6a1b1e7f/go.mod h1:I+B+0ZeOV1Qv8dE/uNAFXOhw7lxfD6FqK6KzTBLBY7E= +github.com/devtron-labs/common-lib v0.18.1-0.20250410084127-3148eb610369 h1:sqQ6HsYNxIBpQ6781Pp9ZeJvCtx4fa1uaE9kiKTGivg= +github.com/devtron-labs/common-lib v0.18.1-0.20250410084127-3148eb610369/go.mod h1:I+B+0ZeOV1Qv8dE/uNAFXOhw7lxfD6FqK6KzTBLBY7E= github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= github.com/docker/cli v24.0.6+incompatible h1:fF+XCQCgJjjQNIMjzaSmiKJSCcfcXb3TWTcc7GAneOY= diff --git a/vendor/github.com/devtron-labs/common-lib/pubsub-lib/JetStreamUtil.go b/vendor/github.com/devtron-labs/common-lib/pubsub-lib/JetStreamUtil.go index a4fb42ee..d5d44ab0 100644 --- a/vendor/github.com/devtron-labs/common-lib/pubsub-lib/JetStreamUtil.go +++ b/vendor/github.com/devtron-labs/common-lib/pubsub-lib/JetStreamUtil.go @@ -125,10 +125,12 @@ type NatsTopic struct { } type ConfigJson struct { // StreamConfigJson is a json string of map[string]NatsStreamConfig - StreamConfigJson string `env:"STREAM_CONFIG_JSON"` + StreamConfigJson string `env:"STREAM_CONFIG_JSON" description:"This is json map of nats stream configurations per stream. eg: {"ORCHESTRATOR":{"max_age":3600,"replicas":1}}"` + // ConsumerConfigJson is a json string of map[string]NatsConsumerConfig // eg: "{\"ARGO_PIPELINE_STATUS_UPDATE_DURABLE-1\" : \"{\"natsMsgProcessingBatchSize\" : 3, \"natsMsgBufferSize\" : 3, \"ackWaitInSecs\": 300}\"}" - ConsumerConfigJson string `env:"CONSUMER_CONFIG_JSON"` + ConsumerConfigJson string `env:"CONSUMER_CONFIG_JSON" description:"ConsumerConfigJson is a json string of map[string]NatsConsumerConfig" ` + } var natsTopicMapping = map[string]NatsTopic{ diff --git a/vendor/github.com/devtron-labs/common-lib/pubsub-lib/NatsClient.go b/vendor/github.com/devtron-labs/common-lib/pubsub-lib/NatsClient.go index 1da3710c..c8c0eea9 100644 --- a/vendor/github.com/devtron-labs/common-lib/pubsub-lib/NatsClient.go +++ b/vendor/github.com/devtron-labs/common-lib/pubsub-lib/NatsClient.go @@ -36,7 +36,8 @@ type NatsClientConfig struct { // consumer wise // NatsMsgProcessingBatchSize is the number of messages that will be processed in one go - NatsMsgProcessingBatchSize int `env:"NATS_MSG_PROCESSING_BATCH_SIZE" envDefault:"1"` + NatsMsgProcessingBatchSize int `env:"NATS_MSG_PROCESSING_BATCH_SIZE" envDefault:"1" description:"NatsMsgProcessingBatchSize is the number of messages that will be processed in one go"` + // NatsMsgBufferSize is the number of messages that will be buffered in memory (channel size) // it is recommended to set this value equal to NatsMsgProcessingBatchSize as we want to process maximum messages in the buffer in one go. @@ -45,10 +46,10 @@ type NatsClientConfig struct { // NatsMsgBufferSize can be configured independently of NatsMsgProcessingBatchSize if needed by setting its value to positive value in env. // if NatsMsgBufferSize set to a non-positive value then it will take the value of NatsMsgProcessingBatchSize. // Note: always get this value by calling GetNatsMsgBufferSize method - NatsMsgBufferSize int `env:"NATS_MSG_BUFFER_SIZE" envDefault:"-1"` - NatsMsgMaxAge int `env:"NATS_MSG_MAX_AGE" envDefault:"86400"` - NatsMsgAckWaitInSecs int `env:"NATS_MSG_ACK_WAIT_IN_SECS" envDefault:"120"` - NatsMsgReplicas int `env:"NATS_MSG_REPLICAS" envDefault:"0"` + NatsMsgBufferSize int `env:"NATS_MSG_BUFFER_SIZE" envDefault:"-1" description:"NatsMsgBufferSize is the number of messages that will be buffered in memory (channel size)"` + NatsMsgMaxAge int `env:"NATS_MSG_MAX_AGE" envDefault:"86400" description:"Age for the message to persist"` + NatsMsgAckWaitInSecs int `env:"NATS_MSG_ACK_WAIT_IN_SECS" envDefault:"120" description:"Time to wait for acknowledging the message"` + NatsMsgReplicas int `env:"NATS_MSG_REPLICAS" envDefault:"0" description:"Replica count for runnings nats instance"` } func (ncc NatsClientConfig) GetNatsMsgBufferSize() int { diff --git a/vendor/modules.txt b/vendor/modules.txt index 632223be..b96d8821 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -118,7 +118,7 @@ github.com/cespare/xxhash/v2 # github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc ## explicit github.com/davecgh/go-spew/spew -# github.com/devtron-labs/common-lib v0.18.1-0.20241003071930-acfb6a1b1e7f +# github.com/devtron-labs/common-lib v0.18.1-0.20250410084127-3148eb610369 ## explicit; go 1.21 github.com/devtron-labs/common-lib/blob-storage github.com/devtron-labs/common-lib/constants