Files
Pat Whittingslow 5c54030f19 add http/httphi (#171)
* add http/httphi

* begin adding httphi tests

* claude found neat bugs

* add low level Handle function and more tests

* more tests, run go generate

* add Hijacker-like functionality

* improve locking and acquisition of Exchanges in reconfiguring

* several bugfixes, add internal.IntLen, round up http-linux example with new router API

* small nit

* add benchmarks

* add query handling

* remove ForEach pattern, allocates in TinyGo

* massive documentation push and code reordering in files

* Router.Handle returns error after being torn down

* run go fix

* rework Mux interface to receive a string request path

* add MethodFrom

* minor doc nit

* fail on incomplete staging

* add raw buffer access

* add streaming API distinct from Exchange

* begin adding multipart form logic

* finish rounding up multipart form parsing

* remove status type

* first Multipart approach

* begin adding readMultiPart

* add Exchange.ReadMultiparts reimagining of clanker slop

* ai insists with backoffs

* simplify clanker slop

* apply go fix

* add a pattern argument to Mux

* explicit header key/value alloc and add ExchangeConfig

* fix tests after excplicit header alloc change

* fix examples

* run go fix

* expose rawsock as experimental package (will use for external benchmarks)

* remove backoff from form parsing

* @MDr164 suggestions get potential fixes

* apply go fix

* add examples

* add README.md

* fix rawsock tinygo implementation

* apply @MDr164 various fixes

* update documentation on ContentLength methods and fix bug in Form reset on empty body

* fix tests

* add fuzz tests

* run go fix

* io.ErrNoProgress on parsing form spin

* run go fix

* remove backoff assumption from Router

* httphi.Handle rejects unsupported protocols

* go format router.go

* add kvbuffer

* rewrite Cookie with KVBuffer

* mid refactor of KVBuffer into Header

* work on KVBuffer exhausted semantics

* add Go's ServeMux Request.PathValue access semantics to Exchange, Mux and MuxSlice

* add PathValue example

* document all the things; improve req Query semantics; add Form.EnableBufferGrowth

* unexport kvBuffer

* add Exchange.PathValueAppend

* use stdlib in example instead of rawsock

* remove rawsock from http example

* add darwin arch rawsock

* fix example

* rename Router.TeardownGoroutines to Shutdown matching http.Server.Shutdown

* rename types and identifiers

* @MDr164 Content-Type and Transfer-Encoding bug catches
2026-07-29 20:20:21 -03:00

148 lines
3.5 KiB
Go

// Code generated by "stringer -type=Type,Class,RCode,OpCode -linecomment -output stringers.go ."; DO NOT EDIT.
package dns
import "strconv"
func _() {
// An "invalid array index" compiler error signifies that the constant values have changed.
// Re-run the stringer command to generate them again.
var x [1]struct{}
_ = x[TypeA-1]
_ = x[TypeNS-2]
_ = x[TypeCNAME-5]
_ = x[TypeSOA-6]
_ = x[TypePTR-12]
_ = x[TypeMX-15]
_ = x[TypeTXT-16]
_ = x[TypeAAAA-28]
_ = x[TypeSRV-33]
_ = x[TypeOPT-41]
_ = x[TypeHTTPS-65]
_ = x[TypeWKS-11]
_ = x[TypeHINFO-13]
_ = x[TypeMINFO-14]
_ = x[TypeAXFR-252]
_ = x[TypeALL-255]
}
const (
_Type_name_0 = "ANS"
_Type_name_1 = "CNAMESOA"
_Type_name_2 = "WKSPTRHINFOMINFOMXTXT"
_Type_name_3 = "AAAA"
_Type_name_4 = "SRV"
_Type_name_5 = "OPT"
_Type_name_6 = "HTTPS SSE"
_Type_name_7 = "AXFR"
_Type_name_8 = "ALL"
)
var (
_Type_index_0 = [...]uint8{0, 1, 3}
_Type_index_1 = [...]uint8{0, 5, 8}
_Type_index_2 = [...]uint8{0, 3, 6, 11, 16, 18, 21}
)
func (i Type) String() string {
switch {
case 1 <= i && i <= 2:
i -= 1
return _Type_name_0[_Type_index_0[i]:_Type_index_0[i+1]]
case 5 <= i && i <= 6:
i -= 5
return _Type_name_1[_Type_index_1[i]:_Type_index_1[i+1]]
case 11 <= i && i <= 16:
i -= 11
return _Type_name_2[_Type_index_2[i]:_Type_index_2[i+1]]
case i == 28:
return _Type_name_3
case i == 33:
return _Type_name_4
case i == 41:
return _Type_name_5
case i == 65:
return _Type_name_6
case i == 252:
return _Type_name_7
case i == 255:
return _Type_name_8
default:
return "Type(" + strconv.FormatInt(int64(i), 10) + ")"
}
}
func _() {
// An "invalid array index" compiler error signifies that the constant values have changed.
// Re-run the stringer command to generate them again.
var x [1]struct{}
_ = x[ClassINET-1]
_ = x[ClassCSNET-2]
_ = x[ClassCHAOS-3]
_ = x[ClassHESIOD-4]
_ = x[ClassANY-255]
}
const (
_Class_name_0 = "INETCSNETCHAOSHESIOD"
_Class_name_1 = "ANY"
)
var (
_Class_index_0 = [...]uint8{0, 4, 9, 14, 20}
)
func (i Class) String() string {
switch {
case 1 <= i && i <= 4:
i -= 1
return _Class_name_0[_Class_index_0[i]:_Class_index_0[i+1]]
case i == 255:
return _Class_name_1
default:
return "Class(" + strconv.FormatInt(int64(i), 10) + ")"
}
}
func _() {
// An "invalid array index" compiler error signifies that the constant values have changed.
// Re-run the stringer command to generate them again.
var x [1]struct{}
_ = x[RCodeSuccess-0]
_ = x[RCodeFormatError-1]
_ = x[RCodeServerFailure-2]
_ = x[RCodeNameError-3]
_ = x[RCodeNotImplemented-4]
_ = x[RCodeRefused-5]
}
const _RCode_name = "successformat errorserver failurename errornot implementedrefused"
var _RCode_index = [...]uint8{0, 7, 19, 33, 43, 58, 65}
func (i RCode) String() string {
idx := int(i) - 0
if i < 0 || idx >= len(_RCode_index)-1 {
return "RCode(" + strconv.FormatInt(int64(i), 10) + ")"
}
return _RCode_name[_RCode_index[idx]:_RCode_index[idx+1]]
}
func _() {
// An "invalid array index" compiler error signifies that the constant values have changed.
// Re-run the stringer command to generate them again.
var x [1]struct{}
_ = x[OpCodeQuery-0]
_ = x[OpCodeInverseQuery-1]
_ = x[OpCodeStatus-2]
}
const _OpCode_name = "Standard queryInverse queryServer status request"
var _OpCode_index = [...]uint8{0, 14, 27, 48}
func (i OpCode) String() string {
idx := int(i) - 0
if i < 0 || idx >= len(_OpCode_index)-1 {
return "OpCode(" + strconv.FormatInt(int64(i), 10) + ")"
}
return _OpCode_name[_OpCode_index[idx]:_OpCode_index[idx+1]]
}