rpc

package
v1.0.38 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: MIT Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

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

Server represents the Connect RPC server

func NewServer

func NewServer(
	store *storage.Store,
	dockerCli *docker.Client,
	sender *command.Sender,
	cfg *config.Config,
	proxyManager *proxy.Manager,
	sched *scheduler.Scheduler,
	metricsCollector *metrics.Collector,
	moduleManager *module.Manager,
	bus *events.Bus,
	log *logger.Logger,
	clientPool *docker.ClientPool,
	placementEngine *docker.PlacementEngine,
) *Server

Creates new Connect RPC server

func (*Server) Handler

func (s *Server) Handler() http.Handler

The HTTP handler for the server

func (*Server) MigrateServerLogSubscriptions

func (s *Server) MigrateServerLogSubscriptions(serverID, oldContainerID, newContainerID string)

MigrateServerLogSubscriptions re-points live console subscriptions for a server from its old container to a new one (MINE-108).

It is the reconciler's LogMigrator: the log streamer moves its subscriber registry (recording an alias so a late unsubscribe still resolves), and the WebSocket hub updates the container key each client will unsubscribe or clean up with. This is what keeps a live console uninterrupted across a container recreation and prevents the channel/goroutine leak that followed it.

func (*Server) RecoveryKey

func (s *Server) RecoveryKey() string

RecoveryKey returns the current recovery key from the auth manager.

func (*Server) RecoveryKeyCreated

func (s *Server) RecoveryKeyCreated() bool

RecoveryKeyCreated reports whether this process generated a new recovery key.

func (*Server) SetHibernationManager

func (s *Server) SetHibernationManager(m *docker.HibernationManager)

SetHibernationManager attaches the HibernationManager to expose hibernation metrics (SCH-6).

func (*Server) Shutdown

func (s *Server) Shutdown()

Shutdown releases the server's background components.

http.Server.Shutdown does NOT wait for hijacked connections, so without this the WebSocket hub kept running and every connected client's pumps stayed alive until the process exited. Call this before srv.Shutdown so live consoles are closed deliberately instead of being torn down at exit.

func (*Server) StartLogStreaming

func (s *Server) StartLogStreaming(containerID string) error

Starts log streaming for a container

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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