MCPcopy Create free account
hub / github.com/docker/cli / ResetTLSMaterial

Method ResetTLSMaterial

cli/context/store/store.go:160–175  ·  view source on GitHub ↗

ResetTLSMaterial removes TLS data for all endpoints in the context and replaces it with the new data.

(name string, data *ContextTLSData)

Source from the content-addressed store, hash-verified

158// ResetTLSMaterial removes TLS data for all endpoints in the context and replaces
159// it with the new data.
160func (s *ContextStore) ResetTLSMaterial(name string, data *ContextTLSData) error {
161 if err := s.tls.remove(name); err != nil {
162 return err
163 }
164 if data == nil {
165 return nil
166 }
167 for ep, files := range data.Endpoints {
168 for fileName, data := range files.Files {
169 if err := s.tls.createOrUpdate(name, ep, fileName, data); err != nil {
170 return err
171 }
172 }
173 }
174 return nil
175}
176
177// ResetEndpointTLSMaterial removes TLS data for the given context and endpoint,
178// and replaces it with the new data.

Callers

nothing calls this directly

Calls 2

removeMethod · 0.45
createOrUpdateMethod · 0.45

Tested by

no test coverage detected