MCPcopy Create free account
hub / github.com/PerpetualSoftware/pad / SetBootstrapToken

Method SetBootstrapToken

internal/server/bootstrap.go:145–150  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

143// token configured — used when EnsureBootstrapToken failed or when the
144// instance is in cloud mode).
145func (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.

Calls

no outgoing calls