remove DeployEnv (no longer needed)
This commit is contained in:
parent
0c02e93821
commit
5b8a86212d
3 changed files with 1 additions and 9 deletions
|
|
@ -13,9 +13,6 @@ import (
|
|||
|
||||
// Config used for BatchConsumer constructor. Any empty fields are populated with defaults.
|
||||
type Config struct {
|
||||
// DeployEnv the name of the deployment environment
|
||||
DeployEnv string
|
||||
|
||||
// LogFile where consumer errors and failed log lines are saved
|
||||
LogFile string
|
||||
|
||||
|
|
@ -56,10 +53,6 @@ func withDefaults(config Config) Config {
|
|||
config.BatchSize = 4 * 1024 * 1024
|
||||
}
|
||||
|
||||
if config.DeployEnv == "" {
|
||||
config.DeployEnv = "unknown-env"
|
||||
}
|
||||
|
||||
// Not totally clear we need this rate limit. The KCL may do rate limiting for us.
|
||||
if config.ReadRateLimit == 0 {
|
||||
config.ReadRateLimit = 1000
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ func (b *batchedWriter) splitMessageIfNecessary(record []byte) ([][]byte, error)
|
|||
}
|
||||
|
||||
// Process a batch of messages from a CWLogs Subscription
|
||||
return splitter.GetMessagesFromGzippedInput(record, b.config.DeployEnv == "production")
|
||||
return splitter.GetMessagesFromGzippedInput(record)
|
||||
}
|
||||
|
||||
func (b *batchedWriter) ProcessRecords(records []kcl.Record) error {
|
||||
|
|
|
|||
|
|
@ -29,7 +29,6 @@ func main() {
|
|||
BatchCount: 500,
|
||||
BatchSize: 4 * 1024 * 1024, // 4Mb
|
||||
LogFile: "/tmp/example-kcl-consumer",
|
||||
DeployEnv: "test-env",
|
||||
}
|
||||
|
||||
output, file := createDummyOutput()
|
||||
|
|
|
|||
Loading…
Reference in a new issue