KCLConfig is the configuration for the KCL input.
| 38 | |
| 39 | // KCLConfig is the configuration for the KCL input. |
| 40 | type KCLConfig struct { |
| 41 | AwsRegion string `help:"AWS region to connect to" default:"us-west-2"` |
| 42 | Stream string `help:"Name of Kinesis stream" required:"true"` |
| 43 | AppName string `help:"Used by KCL to allow multiple app to consume the same stream." required:"true"` |
| 44 | MaxShards int `help:"Max shards this Worker can handle at a time" default:"32767"` |
| 45 | ShardSync time.Duration `help:"Time between tasks to sync leases and Kinesis shards" default:"60s"` |
| 46 | LeaseDuration time.Duration `help:"Time after which a worker should have renewed all shard leases before not being considered owner anymore" default:"60s"` |
| 47 | InitialPosition string `help:"Position in the stream where a new application should start from. Values: LATEST or TRIM_HORIZON" default:"LATEST"` |
| 48 | initialPosition config.InitialPositionInStream |
| 49 | } |
| 50 | |
| 51 | var appNameRx = regexp.MustCompile(`^[a-zA-Z_0-9]+$`) |
| 52 |
nothing calls this directly
no outgoing calls
no test coverage detected