forked from 0xPolygon/zkevm-data-streamer
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add timeout for write operations on client connections (0xPolygon#120)
* Add a timeout for write operations on client connections * DeadlineWrite renamed to TimeoutWrite. Log to show when timeout occurs --------- Co-authored-by: agnusmor <[email protected]>
- Loading branch information
Showing
7 changed files
with
93 additions
and
34 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,19 @@ | ||
package datastreamer | ||
|
||
import "github.com/0xPolygonHermez/zkevm-data-streamer/log" | ||
import ( | ||
"time" | ||
|
||
"github.com/0xPolygonHermez/zkevm-data-streamer/log" | ||
) | ||
|
||
// Config type for datastreamer server | ||
type Config struct { | ||
// Port to listen on | ||
Port uint16 `mapstructure:"Port"` | ||
// Filename of the binary data file | ||
Filename string `mapstructure:"Filename"` | ||
// WriteTimeout for write opeations on client connections | ||
WriteTimeout time.Duration | ||
// Log | ||
Log log.Config `mapstructure:"Log"` | ||
} |
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
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