server

package
v1.78.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 14, 2026 License: Apache-2.0 Imports: 14 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	// SocketPath is the Unix socket the packages API listens on (the CLI's PACKAGES_DEBUG_UNIX_SOCKET
	// default).
	SocketPath = "/tmp/deckhouse-debug.socket"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server serves the runtime API: the private tree on the Unix socket, the public one over TCP.

func New

func New(metrics metricsstorage.Storage, ready ready, deps v1.Deps, logger *log.Logger) *Server

New builds both transports; nothing is bound until Start.

func NewSocketOnly

func NewSocketOnly(socketPath string, ready ready, deps v1.Deps, logger *log.Logger) *Server

NewSocketOnly builds the private tree on the Unix socket at socketPath and no TCP listener, for a process whose metrics and probes another server owns (addon-operator). Without metrics and an elector, /metrics answers 404 and /readyz reports ready's own answer.

func (*Server) GetElector

func (s *Server) GetElector() *leaderelection.LeaderElector

GetElector returns the leader elector for this server.

func (*Server) GetMetrics

func (s *Server) GetMetrics() metricsstorage.Storage

GetMetrics returns the metrics storage for this server.

func (*Server) Ready

func (s *Server) Ready() bool

Ready reports whether the controller finished its startup converge.

func (*Server) SetElector

func (s *Server) SetElector(elector *leaderelection.LeaderElector)

SetElector sets the leader elector for this server.

func (*Server) Start

func (s *Server) Start() error

Start binds the socket and the TCP listener, then watches the serve loops; only a bind failure is returned.

func (*Server) Stop

func (s *Server) Stop() error

Stop closes both listeners and waits for their serve loops to finish; closing the socket unlinks its file.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL