Documentation
¶
Overview ¶
Copyright 2026 Flant JSC
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Package tcp serves the API over a TCP address. The deckhouse pod runs with hostNetwork, so the listener lives in the node's network namespace: every process on the node and every hostNetwork pod reaches it, and so does `kubectl port-forward`. Loopback is not a trust boundary here — secret-bearing endpoints must not be registered on this transport.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrNoPort = errors.New("no port configured")
ErrNoPort is returned when the server is started without a port.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server serves the given handler on its TCP address.
func NewServer ¶
NewServer creates a server for the given address and port. An empty address binds every interface, which publishes the routes cluster-wide. Nothing is bound until Start.
func (*Server) Shutdown ¶
Shutdown stops serving and closes the listener. Safe to call when Start was never reached, which happens when the other transport failed to bind.