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

163 lines
4.7 KiB
Go

// Code generated by "stringer -type=MsgType,ClientState,OptCode,StatusCode,DUIDType -linecomment -output stringers.go"; DO NOT EDIT.
package dhcpv6
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[MsgSolicit-1]
_ = x[MsgAdvertise-2]
_ = x[MsgRequest-3]
_ = x[MsgConfirm-4]
_ = x[MsgRenew-5]
_ = x[MsgRebind-6]
_ = x[MsgReply-7]
_ = x[MsgRelease-8]
_ = x[MsgDecline-9]
_ = x[MsgReconfigure-10]
_ = x[MsgInformRequest-11]
_ = x[MsgRelayForw-12]
_ = x[MsgRelayRepl-13]
}
const _MsgType_name = "solicitadvertiserequestconfirmrenewrebindreplyreleasedeclinereconfigureinform-requestrelay-forwrelay-repl"
var _MsgType_index = [...]uint8{0, 7, 16, 23, 30, 35, 41, 46, 53, 60, 71, 85, 95, 105}
func (i MsgType) String() string {
idx := int(i) - 1
if i < 1 || idx >= len(_MsgType_index)-1 {
return "MsgType(" + strconv.FormatInt(int64(i), 10) + ")"
}
return _MsgType_name[_MsgType_index[idx]:_MsgType_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[StateInit-1]
_ = x[StateSoliciting-2]
_ = x[StateRequesting-3]
_ = x[StateBound-4]
_ = x[StateRenewing-5]
_ = x[StateRebinding-6]
}
const _ClientState_name = "initsolicitingrequestingboundrenewingrebinding"
var _ClientState_index = [...]uint8{0, 4, 14, 24, 29, 37, 46}
func (i ClientState) String() string {
idx := int(i) - 1
if i < 1 || idx >= len(_ClientState_index)-1 {
return "ClientState(" + strconv.FormatInt(int64(i), 10) + ")"
}
return _ClientState_name[_ClientState_index[idx]:_ClientState_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[OptClientID-1]
_ = x[OptServerID-2]
_ = x[OptIANA-3]
_ = x[OptIATA-4]
_ = x[OptIAAddr-5]
_ = x[OptORO-6]
_ = x[OptPreference-7]
_ = x[OptElapsedTime-8]
_ = x[OptRelayMsg-9]
_ = x[OptAuth-11]
_ = x[OptUnicast-12]
_ = x[OptStatusCode-13]
_ = x[OptRapidCommit-14]
_ = x[OptUserClass-15]
_ = x[OptVendorClass-16]
_ = x[OptVendorOpts-17]
_ = x[OptInterfaceID-18]
_ = x[OptReconfMsg-19]
_ = x[OptReconfAccept-20]
_ = x[OptDNSServers-23]
_ = x[OptDomainList-24]
_ = x[OptIAPD-25]
_ = x[OptIAPrefix-26]
_ = x[OptNTPServer-56]
}
const (
_OptCode_name_0 = "client-idserver-idia-naia-taiaaddroropreferenceelapsed-timerelay-msg"
_OptCode_name_1 = "authunicaststatus-coderapid-commituser-classvendor-classvendor-optsinterface-idreconf-msgreconf-accept"
_OptCode_name_2 = "dns-serversdomain-listia-pdiaprefix"
_OptCode_name_3 = "ntp-server"
)
var (
_OptCode_index_0 = [...]uint8{0, 9, 18, 23, 28, 34, 37, 47, 59, 68}
_OptCode_index_1 = [...]uint8{0, 4, 11, 22, 34, 44, 56, 67, 79, 89, 102}
_OptCode_index_2 = [...]uint8{0, 11, 22, 27, 35}
)
func (i OptCode) String() string {
switch {
case 1 <= i && i <= 9:
i -= 1
return _OptCode_name_0[_OptCode_index_0[i]:_OptCode_index_0[i+1]]
case 11 <= i && i <= 20:
i -= 11
return _OptCode_name_1[_OptCode_index_1[i]:_OptCode_index_1[i+1]]
case 23 <= i && i <= 26:
i -= 23
return _OptCode_name_2[_OptCode_index_2[i]:_OptCode_index_2[i+1]]
case i == 56:
return _OptCode_name_3
default:
return "OptCode(" + 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[StatusSuccess-0]
_ = x[StatusUnspecFail-1]
_ = x[StatusNoAddrsAvail-2]
_ = x[StatusNoBinding-3]
_ = x[StatusNotOnLink-4]
_ = x[StatusUseMulticast-5]
}
const _StatusCode_name = "successunspec-failno-addrs-availno-bindingnot-on-linkuse-multicast"
var _StatusCode_index = [...]uint8{0, 7, 18, 32, 42, 53, 66}
func (i StatusCode) String() string {
idx := int(i) - 0
if i < 0 || idx >= len(_StatusCode_index)-1 {
return "StatusCode(" + strconv.FormatInt(int64(i), 10) + ")"
}
return _StatusCode_name[_StatusCode_index[idx]:_StatusCode_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[DUIDTypeLLT-1]
_ = x[DUIDTypeEN-2]
_ = x[DUIDTypeLL-3]
}
const _DUIDType_name = "duid-lltduid-enduid-ll"
var _DUIDType_index = [...]uint8{0, 8, 15, 22}
func (i DUIDType) String() string {
idx := int(i) - 1
if i < 1 || idx >= len(_DUIDType_index)-1 {
return "DUIDType(" + strconv.FormatInt(int64(i), 10) + ")"
}
return _DUIDType_name[_DUIDType_index[idx]:_DUIDType_index[idx+1]]
}