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) SetLastObservation(fn func() time.Time)
- func (s *Server) SetReconcilerNudge(fn func(serverID string))
- 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, storageResolvers ...*nodestorage.Resolver, ) *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) SetLastObservation ¶ added in v1.0.40
SetLastObservation supplies the time of the last completed observation sweep. It is installed after the reconciler starts, so a server construction that happens first still works: the health snapshot simply falls back to each row's own update time.
func (*Server) SetReconcilerNudge ¶ added in v1.0.40
SetReconcilerNudge supplies the hook that converges a server immediately after an operator releases a lifecycle lock, instead of leaving the server blocked until the next safety-net sweep.
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