core: Implement socket activation listeners (#6573)

* caddy adapt for listen_protocols

* adapt listen_socket

* allow multiple listen sockets for port ranges and readd socket fd listen logic

* readd logic to start servers according to listener protocols

* gofmt

* adapt caddytest

* gosec

* fmt and rename listen to listenWithSocket

* fmt and rename listen to listenWithSocket

* more consistent error msg

* non unix listenReusableWithSocketFile

* remove unused func

* doc comment typo

* nonosec

* commit

* doc comments

* more doc comments

* comment was misleading, cardinality did not change

* addressesWithProtocols

* update test

* fd/ and fdgram/

* rm addr

* actually write...

* i guess we doin' "skip": now

* wrong var in placeholder

* wrong var in placeholder II

* update param name in comment

* dont save nil file pointers

* windows

* key -> parsedKey

* osx

* multiple default_bind with protocols

* check for h1 and h2 listener netw
This commit is contained in:
Aaron Paterson 2024-09-30 12:55:03 -04:00 committed by GitHub
parent 1a345b4fa6
commit 4b1a9b6cc1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
21 changed files with 946 additions and 364 deletions

View file

@ -299,11 +299,11 @@ func ToString(val any) string {
case int64:
return strconv.Itoa(int(v))
case uint:
return strconv.Itoa(int(v))
return strconv.FormatUint(uint64(v), 10)
case uint32:
return strconv.Itoa(int(v))
return strconv.FormatUint(uint64(v), 10)
case uint64:
return strconv.Itoa(int(v))
return strconv.FormatUint(v, 10)
case float32:
return strconv.FormatFloat(float64(v), 'f', -1, 32)
case float64: