diff --git a/docs/CNAME b/docs/CNAME new file mode 100644 index 0000000..d8d891f --- /dev/null +++ b/docs/CNAME @@ -0,0 +1 @@ +docs.goreplay.org \ No newline at end of file diff --git a/docs/_config.yml b/docs/_config.yml new file mode 100644 index 0000000..c419263 --- /dev/null +++ b/docs/_config.yml @@ -0,0 +1 @@ +theme: jekyll-theme-cayman \ No newline at end of file diff --git a/docs/index.md b/docs/index.md index cd7a7d9..1539924 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,33 +1,29 @@ ---- -layout: home ---- - Gor is an open-source tool for capturing and replaying live HTTP traffic into a test environment in order to continuously test your system with real data. It can be used to increase confidence in code deployments, configuration changes and infrastructure changes. Read for more info: -* [Tutorial](getting-started/tutorial.md) -* [The Basics](getting-started/basics.md) -* [Capturing and replaying traffic](capturing-and-replaying-traffic.md) -* [Replaying HTTP traffic](replaying-http-traffic.md) -* [[PRO] Replaying Binary protocols](pro/replaying-binary-protocols.md) -* [[PRO] Recording and replaying keep alive TCP sessions](pro/recording-and-replaying-keep-alive-tcp-sessions.md) -* [Saving and Replaying from file](saving-and-replaying-from-file.md) -* [Performance testing](saving-and-replaying-from-file.md#performance-testing) -* [Rate limiting](rate-limiting.md) -* [Request filtering](request-filtering.md) -* [Request rewriting](request-rewriting.md) -* [Middleware](middleware.md) -* [Distributed configuration](distributed-configuration.md) -* [Exporting to ElasticSearch](exporting-to-elasticsearch.md) -* [FAQ](faq.md) -* [Troubleshooting](troubleshooting.md) +* [[Getting Started]] +* [[The Basics]] +* [[Capturing and replaying traffic]] +* [[Replaying HTTP traffic]] +* [[[PRO] Replaying Binary protocols]] +* [[[PRO] Recording and replaying keep alive TCP sessions]] +* [[Saving and Replaying from file]] +* [Performance testing](https://github.com/buger/gor/wiki/Saving-and-Replaying-from-file#performance-testing) +* [[Rate limiting]] +* [[Request filtering]] +* [[Request rewriting]] +* [[Middleware]] +* [[Distributed configuration]] +* [[Exporting to ElasticSearch]] +* [[FAQ]] +* [[Troubleshooting]] ## Commercial Aspects -* [Commercial Support](commercial-support.md) -* [Commercial FAQ](commercial-faq.md) -* [Commercial collaboration](commercial-collaboration.md) +* [[Commercial Support]] +* [[Commercial FAQ]] +* [[Commercial collaboration]] Next: [Getting Started](Getting-Started) diff --git a/output_file.go b/output_file.go index 1ac00dc..5804214 100644 --- a/output_file.go +++ b/output_file.go @@ -36,15 +36,15 @@ type FileOutputConfig struct { // FileOutput output plugin type FileOutput struct { - mu sync.Mutex - pathTemplate string - currentName string - file *os.File - queueLength int - chunkSize int - writer io.Writer - requestPerFile bool - currentID string + mu sync.Mutex + pathTemplate string + currentName string + file *os.File + queueLength int + chunkSize int + writer io.Writer + requestPerFile bool + currentID string config *FileOutputConfig } @@ -62,8 +62,9 @@ func NewFileOutput(pathTemplate string, config *FileOutputConfig) *FileOutput { go func() { for { - time.Sleep(time.Second) + time.Sleep(config.flushInterval) o.updateName() + o.flush() } }()