Last active
July 8, 2020 12:35
-
-
Save bschaeffer/2cc497396bd10dbfa0b34214871c5752 to your computer and use it in GitHub Desktop.
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
func newHTTPOutput(_ outputs.IndexManager, _ beat.Info, stats outputs.Observer, cfg *common.Config) (outputs.Group, error) { | |
config := clientConfig{} | |
if err := cfg.Unpack(&config); err != nil { | |
return outputs.Fail(err) | |
} | |
clients := make([]outputs.NetworkClient, config.Workers) | |
for i := 0; i < config.Workers; i++ { | |
clients[i] = &httpClient{ | |
stats: stats, | |
endpoint: config.Endpoint, | |
} | |
} | |
return outputs.Success(confg.BatchSize, config.RetryLimit, clients...) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment