aboutsummaryrefslogtreecommitdiff
path: root/prefork
diff options
context:
space:
mode:
authorGravatar Oleksandr Redko <Oleksandr_Redko@epam.com> 2023-12-13 07:56:24 +0200
committerGravatar GitHub <noreply@github.com> 2023-12-13 13:56:24 +0800
commit9d6b4702602cd29387a639c35cfb92e21a3bad11 (patch)
treed399130b9276f88be21cd277940110154df329f9 /prefork
parentchore: Set max line length to 130 characters (#1676) (diff)
downloadfasthttp-9d6b4702602cd29387a639c35cfb92e21a3bad11.tar.gz
fasthttp-9d6b4702602cd29387a639c35cfb92e21a3bad11.tar.bz2
fasthttp-9d6b4702602cd29387a639c35cfb92e21a3bad11.zip
chore: Add missing dots at the end of comments (#1677)
Diffstat (limited to 'prefork')
-rw-r--r--prefork/prefork.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/prefork/prefork.go b/prefork/prefork.go
index 91def48..fa45348 100644
--- a/prefork/prefork.go
+++ b/prefork/prefork.go
@@ -34,11 +34,11 @@ type Logger interface {
Printf(format string, args ...any)
}
-// Prefork implements fasthttp server prefork
+// Prefork implements fasthttp server prefork.
//
// Preforks master process (with all cores) between several child processes
// increases performance significantly, because Go doesn't have to share
-// and manage memory between cores
+// and manage memory between cores.
//
// WARNING: using prefork prevents the use of any global state!
// Things like in-memory caches won't work.
@@ -75,7 +75,7 @@ func init() { //nolint:gochecknoinits
flag.Bool(preforkChildFlag[1:], false, "Is a child process")
}
-// IsChild checks if the current thread/process is a child
+// IsChild checks if the current thread/process is a child.
func IsChild() bool {
for _, arg := range os.Args[1:] {
if arg == preforkChildFlag {
@@ -86,7 +86,7 @@ func IsChild() bool {
return false
}
-// New wraps the fasthttp server to run with preforked processes
+// New wraps the fasthttp server to run with preforked processes.
func New(s *fasthttp.Server) *Prefork {
return &Prefork{
Network: defaultNetwork,
@@ -230,7 +230,7 @@ func (p *Prefork) prefork(addr string) (err error) {
return
}
-// ListenAndServe serves HTTP requests from the given TCP addr
+// ListenAndServe serves HTTP requests from the given TCP addr.
func (p *Prefork) ListenAndServe(addr string) error {
if IsChild() {
ln, err := p.listen(addr)
@@ -246,7 +246,7 @@ func (p *Prefork) ListenAndServe(addr string) error {
return p.prefork(addr)
}
-// ListenAndServeTLS serves HTTPS requests from the given TCP addr
+// ListenAndServeTLS serves HTTPS requests from the given TCP addr.
//
// certFile and keyFile are paths to TLS certificate and key files.
func (p *Prefork) ListenAndServeTLS(addr, certKey, certFile string) error {
@@ -264,7 +264,7 @@ func (p *Prefork) ListenAndServeTLS(addr, certKey, certFile string) error {
return p.prefork(addr)
}
-// ListenAndServeTLSEmbed serves HTTPS requests from the given TCP addr
+// ListenAndServeTLSEmbed serves HTTPS requests from the given TCP addr.
//
// certData and keyData must contain valid TLS certificate and key data.
func (p *Prefork) ListenAndServeTLSEmbed(addr string, certData, keyData []byte) error {