| 61 | } |
| 62 | |
| 63 | func (cfg *KCLConfig) fillDefaults() { |
| 64 | if cfg.AwsRegion == "" { |
| 65 | cfg.AwsRegion = "us-west-2" |
| 66 | } |
| 67 | switch cfg.InitialPosition { |
| 68 | case "", "LATEST": |
| 69 | cfg.initialPosition = config.LATEST |
| 70 | case "TRIM_HORIZON": |
| 71 | cfg.initialPosition = config.TRIM_HORIZON |
| 72 | } |
| 73 | if cfg.MaxShards == 0 { |
| 74 | cfg.MaxShards = math.MaxInt16 |
| 75 | } |
| 76 | if cfg.ShardSync == 0 { |
| 77 | cfg.ShardSync = time.Minute |
| 78 | } |
| 79 | if cfg.LeaseDuration == 0 { |
| 80 | cfg.LeaseDuration = time.Minute |
| 81 | } |
| 82 | } |
| 83 | |
| 84 | // KCL is a Baker input reading from Kinesis with the KCL (Kinesis Client Library). |
| 85 | type KCL struct { |