-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(agent): add retry mechanism (#245)
* refactor: move Config from agent to config package * refactor(agent): create a config struct to store agent's configurations * feat(agent): add retry mechanism for sink * feat(agent): log retry attempts * feat(agent): change retry interval strategy to become exponential * feat: make agent retry configurable * feat(columbus): retry if columbus returns 5** status code * feat(agent): skip record instead of returning error on failed sink * refactor: change RetryTimes to MaxRetries * refactor(agent): move retry func to a struct * feat(agent): make skipping record on sink error configurable
- Loading branch information
1 parent
b343574
commit 93e110a
Showing
13 changed files
with
400 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,19 @@ | ||
package agent | ||
|
||
// Config contains the configuration for the agent. | ||
import ( | ||
"time" | ||
|
||
"github.com/odpf/meteor/registry" | ||
"github.com/odpf/salt/log" | ||
) | ||
|
||
type Config struct { | ||
LogLevel string `mapstructure:"LOG_LEVEL" default:"info"` | ||
StatsdEnabled bool `mapstructure:"STATSD_ENABLED" default:"false"` | ||
StatsdHost string `mapstructure:"STATSD_HOST" default:"localhost:8125"` | ||
StatsdPrefix string `mapstructure:"STATSD_PREFIX" default:"meteor"` | ||
ExtractorFactory *registry.ExtractorFactory | ||
ProcessorFactory *registry.ProcessorFactory | ||
SinkFactory *registry.SinkFactory | ||
Monitor Monitor | ||
Logger log.Logger | ||
MaxRetries int | ||
RetryInitialInterval time.Duration | ||
StopOnSinkError bool | ||
} |
Oops, something went wrong.