mirror of
https://github.com/hanzoai/volume.git
synced 2026-11-02 12:11:53 +00:00
A fork of Rancher's local-path-provisioner at v0.0.36. The behaviour is unchanged and deliberately so — a directory on the node a pod lands on is the right thing for a disk. What changes is identity. The provisioner answers to hanzo.ai/volume rather than rancher.io/local-path. That is not branding: two provisioners sharing one name race for the same claims, and a stock k3s carries the upstream one, so a cluster running both would settle our storage by chance. Data lives at /var/lib/hanzo/volume, so reading a Hanzo cluster does not mean learning another vendor's directory. Apache-2.0 as published, unaltered, with Rancher's attribution in NOTICE. The README says what this is not: durability. A volume here dies with its node. That is hanzoai/replicate's question, one layer up, and keeping the two apart is what lets the disk stay this simple.
62 lines
1.7 KiB
Go
62 lines
1.7 KiB
Go
// Copyright 2024 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
//go:build go1.24
|
|
|
|
package http2
|
|
|
|
import "net/http"
|
|
|
|
// fillNetHTTPServerConfig sets fields in conf from srv.HTTP2.
|
|
func fillNetHTTPServerConfig(conf *http2Config, srv *http.Server) {
|
|
fillNetHTTPConfig(conf, srv.HTTP2)
|
|
}
|
|
|
|
// fillNetHTTPTransportConfig sets fields in conf from tr.HTTP2.
|
|
func fillNetHTTPTransportConfig(conf *http2Config, tr *http.Transport) {
|
|
fillNetHTTPConfig(conf, tr.HTTP2)
|
|
}
|
|
|
|
func fillNetHTTPConfig(conf *http2Config, h2 *http.HTTP2Config) {
|
|
if h2 == nil {
|
|
return
|
|
}
|
|
if h2.MaxConcurrentStreams != 0 {
|
|
conf.MaxConcurrentStreams = uint32(h2.MaxConcurrentStreams)
|
|
}
|
|
if h2.MaxEncoderHeaderTableSize != 0 {
|
|
conf.MaxEncoderHeaderTableSize = uint32(h2.MaxEncoderHeaderTableSize)
|
|
}
|
|
if h2.MaxDecoderHeaderTableSize != 0 {
|
|
conf.MaxDecoderHeaderTableSize = uint32(h2.MaxDecoderHeaderTableSize)
|
|
}
|
|
if h2.MaxConcurrentStreams != 0 {
|
|
conf.MaxConcurrentStreams = uint32(h2.MaxConcurrentStreams)
|
|
}
|
|
if h2.MaxReadFrameSize != 0 {
|
|
conf.MaxReadFrameSize = uint32(h2.MaxReadFrameSize)
|
|
}
|
|
if h2.MaxReceiveBufferPerConnection != 0 {
|
|
conf.MaxUploadBufferPerConnection = int32(h2.MaxReceiveBufferPerConnection)
|
|
}
|
|
if h2.MaxReceiveBufferPerStream != 0 {
|
|
conf.MaxUploadBufferPerStream = int32(h2.MaxReceiveBufferPerStream)
|
|
}
|
|
if h2.SendPingTimeout != 0 {
|
|
conf.SendPingTimeout = h2.SendPingTimeout
|
|
}
|
|
if h2.PingTimeout != 0 {
|
|
conf.PingTimeout = h2.PingTimeout
|
|
}
|
|
if h2.WriteByteTimeout != 0 {
|
|
conf.WriteByteTimeout = h2.WriteByteTimeout
|
|
}
|
|
if h2.PermitProhibitedCipherSuites {
|
|
conf.PermitProhibitedCipherSuites = true
|
|
}
|
|
if h2.CountError != nil {
|
|
conf.CountError = h2.CountError
|
|
}
|
|
}
|