File tree Expand file tree Collapse file tree 4 files changed +15
-15
lines changed Expand file tree Collapse file tree 4 files changed +15
-15
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ Is based on [erikdubbelboer's fasthttp fork](https://github.com/erikdubbelboer/f
29
29
- TLSEnable * (bool)* : Enable HTTPS
30
30
- CertKey * (string)* : Path of cert.key file
31
31
- CertFile * (string)* : Path of cert.pem file
32
- - GracefulEnable * (bool)* : Start server with graceful shutdown
32
+ - GracefulShutdown * (bool)* : Start server with graceful shutdown
33
33
34
34
## Note:
35
35
` *atreugo.RequestCtx ` is equal than ` *fasthttp.RequestCtx ` , but adding extra funtionality, so you can use
Original file line number Diff line number Diff line change @@ -152,7 +152,7 @@ func (s *Atreugo) ListenAndServe() error {
152
152
addr := fmt .Sprintf ("%s:%d" , s .cfg .Host , s .cfg .Port )
153
153
ln := s .getListener (addr )
154
154
155
- if s .cfg .GracefulEnable {
155
+ if s .cfg .GracefulShutdown {
156
156
return s .serveGracefully (ln )
157
157
}
158
158
Original file line number Diff line number Diff line change @@ -540,11 +540,11 @@ func TestAtreugo_ListenAndServe(t *testing.T) {
540
540
for _ , tt := range tests {
541
541
t .Run (tt .name , func (t * testing.T ) {
542
542
s := New (& Config {
543
- Host : "localhost" ,
544
- Port : 8000 ,
545
- LogLevel : "error" ,
546
- TLSEnable : tt .args .tlsEnable ,
547
- GracefulEnable : tt .args .graceful ,
543
+ Host : "localhost" ,
544
+ Port : 8000 ,
545
+ LogLevel : "error" ,
546
+ TLSEnable : tt .args .tlsEnable ,
547
+ GracefulShutdown : tt .args .graceful ,
548
548
})
549
549
550
550
serverCh := make (chan error , 1 )
Original file line number Diff line number Diff line change @@ -12,14 +12,14 @@ import (
12
12
13
13
// Config config for Atreugo
14
14
type Config struct {
15
- Host string
16
- Port int
17
- LogLevel string
18
- Compress bool
19
- TLSEnable bool
20
- CertKey string
21
- CertFile string
22
- GracefulEnable bool
15
+ Host string
16
+ Port int
17
+ LogLevel string
18
+ Compress bool
19
+ TLSEnable bool
20
+ CertKey string
21
+ CertFile string
22
+ GracefulShutdown bool
23
23
}
24
24
25
25
// Atreugo struct for make up a server
You can’t perform that action at this time.
0 commit comments