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

95 lines
3.3 KiB
Go

// Code generated by "stringer -type=Type,CodeDestinationUnreachable,CodeParameterProblem -linecomment -output stringers.go"; DO NOT EDIT.
package icmpv6
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[TypeDestinationUnreachable-1]
_ = x[TypePacketTooBig-2]
_ = x[TypeTimeExceeded-3]
_ = x[TypeParameterProblem-4]
_ = x[TypeEchoRequest-128]
_ = x[TypeEchoReply-129]
_ = x[TypeRouterSolicitation-133]
_ = x[TypeRouterAdvertisement-134]
_ = x[TypeNeighborSolicitation-135]
_ = x[TypeNeighborAdvertisement-136]
_ = x[TypeRedirectMessage-137]
}
const (
_Type_name_0 = "destination unreachablepacket too bigtime exceededparameter problem"
_Type_name_1 = "echo requestecho reply"
_Type_name_2 = "router solicitationrouter advertisementneighbor solicitationneighbor advertisementredirect message"
)
var (
_Type_index_0 = [...]uint8{0, 23, 37, 50, 67}
_Type_index_1 = [...]uint8{0, 12, 22}
_Type_index_2 = [...]uint8{0, 19, 39, 60, 82, 98}
)
func (i Type) String() string {
switch {
case 1 <= i && i <= 4:
i -= 1
return _Type_name_0[_Type_index_0[i]:_Type_index_0[i+1]]
case 128 <= i && i <= 129:
i -= 128
return _Type_name_1[_Type_index_1[i]:_Type_index_1[i+1]]
case 133 <= i && i <= 137:
i -= 133
return _Type_name_2[_Type_index_2[i]:_Type_index_2[i+1]]
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[CodeNoRoute-0]
_ = x[CodeAdminProhibited-1]
_ = x[CodeBeyondScope-2]
_ = x[CodeAddressUnreachable-3]
_ = x[CodePortUnreachable-4]
_ = x[CodeIngressEgressPolicy-5]
_ = x[CodeRejectRoute-6]
}
const _CodeDestinationUnreachable_name = "no route to destinationcommunication administratively prohibitedbeyond scope of source addressaddress unreachableport unreachablesource address failed ingress/egress policyreject route to destination"
var _CodeDestinationUnreachable_index = [...]uint8{0, 23, 64, 94, 113, 129, 172, 199}
func (i CodeDestinationUnreachable) String() string {
idx := int(i) - 0
if i < 0 || idx >= len(_CodeDestinationUnreachable_index)-1 {
return "CodeDestinationUnreachable(" + strconv.FormatInt(int64(i), 10) + ")"
}
return _CodeDestinationUnreachable_name[_CodeDestinationUnreachable_index[idx]:_CodeDestinationUnreachable_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[CodeErroneousHeaderField-0]
_ = x[CodeUnrecognizedNextHeader-1]
_ = x[CodeUnrecognizedIPv6Option-2]
}
const _CodeParameterProblem_name = "erroneous header field encounteredunrecognized next header type encounteredunrecognized IPv6 option encountered"
var _CodeParameterProblem_index = [...]uint8{0, 34, 75, 111}
func (i CodeParameterProblem) String() string {
idx := int(i) - 0
if i < 0 || idx >= len(_CodeParameterProblem_index)-1 {
return "CodeParameterProblem(" + strconv.FormatInt(int64(i), 10) + ")"
}
return _CodeParameterProblem_name[_CodeParameterProblem_index[idx]:_CodeParameterProblem_index[idx+1]]
}