From 3f181b3c06df3208e1816c13b5f74d08f47701f7 Mon Sep 17 00:00:00 2001 From: Conner Fromknecht Date: Wed, 13 Mar 2019 20:32:25 -0700 Subject: [PATCH] lncfg/workers: configurable read, write, and sig pool workers --- lncfg/workers.go | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 lncfg/workers.go diff --git a/lncfg/workers.go b/lncfg/workers.go new file mode 100644 index 000000000..cf3a8724c --- /dev/null +++ b/lncfg/workers.go @@ -0,0 +1,28 @@ +package lncfg + +const ( + // DefaultReadWorkers is the default maximum number of concurrent + // workers used by the daemon's read pool. + DefaultReadWorkers = 16 + + // DefaultWriteWorkers is the default maximum number of concurrent + // workers used by the daemon's write pool. + DefaultWriteWorkers = 16 + + // DefaultSigWorkers is the default maximum number of concurrent workers + // used by the daemon's sig pool. + DefaultSigWorkers = 8 +) + +// Workers exposes CLI configuration for turning resources consumed by worker +// pools. +type Workers struct { + // Read is the maximum number of concurrent read pool workers. + Read int `long:"read" description:"Maximum number of concurrent read pool workers."` + + // Write is the maximum number of concurrent write pool workers. + Write int `long:"write" description:"Maximum number of concurrent write pool workers."` + + // Sig is the maximum number of concurrent sig pool workers. + Sig int `long:"sig" description:"Maximum number of concurrent sig pool workers."` +}