ResetTLSMaterial removes TLS data for all endpoints in the context and replaces it with the new data.
(name string, data *ContextTLSData)
| 158 | // ResetTLSMaterial removes TLS data for all endpoints in the context and replaces |
| 159 | // it with the new data. |
| 160 | func (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. |
nothing calls this directly
no test coverage detected