MCPcopy
hub / github.com/caddyserver/certmagic / ObtainCertSync

Method ObtainCertSync

config.go:537–539  ·  view source on GitHub ↗

ObtainCertSync generates a new private key and obtains a certificate for name using cfg in the foreground; i.e. interactively and without retries. It stows the renewed certificate and its assets in storage if successful. It DOES NOT load the certificate into the in-memory cache. This method is a no-

(ctx context.Context, name string)

Source from the content-addressed store, hash-verified

535// It DOES NOT load the certificate into the in-memory cache. This method
536// is a no-op if storage already has a certificate for name.
537func (cfg *Config) ObtainCertSync(ctx context.Context, name string) error {
538 return cfg.obtainCert(ctx, name, true)
539}
540
541// ObtainCertAsync is the same as ObtainCertSync(), except it runs in the
542// background; i.e. non-interactively, and with retries if it fails.

Callers 1

manageOneMethod · 0.95

Calls 1

obtainCertMethod · 0.95

Tested by

no test coverage detected