Documentation
¶
Index ¶
- type Server
- func (s *Server) Handler() http.Handler
- func (s *Server) MigrateServerLogSubscriptions(serverID, oldContainerID, newContainerID string)
- func (s *Server) RecoveryKey() string
- func (s *Server) RecoveryKeyCreated() bool
- func (s *Server) SetHibernationManager(m *docker.HibernationManager)
- func (s *Server) Shutdown()
- func (s *Server) StartLogStreaming(containerID string) error
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) MigrateServerLogSubscriptions ¶
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 ¶
RecoveryKey returns the current recovery key from the auth manager.
func (*Server) RecoveryKeyCreated ¶
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 ¶
Starts log streaming for a container