SetBootstrapToken wires the in-memory token + on-disk path into the Server. Called once at startup from cmd/pad/main.go after EnsureBootstrapToken succeeds. Empty token is allowed (means: no token configured — used when EnsureBootstrapToken failed or when the instance is in cloud mode).
(token, path string)
| 143 | // token configured — used when EnsureBootstrapToken failed or when the |
| 144 | // instance is in cloud mode). |
| 145 | func (s *Server) SetBootstrapToken(token, path string) { |
| 146 | s.bootstrapMu.Lock() |
| 147 | defer s.bootstrapMu.Unlock() |
| 148 | s.bootstrapToken = token |
| 149 | s.bootstrapTokenPath = path |
| 150 | } |
| 151 | |
| 152 | // hasBootstrapToken reports whether a bootstrap token is currently |
| 153 | // configured. Lock-aware — safe to call without holding s.bootstrapMu. |
no outgoing calls