ResetEndpointTLSMaterial removes TLS data for the given context and endpoint, and replaces it with the new data.
(contextName string, endpointName string, data *EndpointTLSData)
| 177 | // ResetEndpointTLSMaterial removes TLS data for the given context and endpoint, |
| 178 | // and replaces it with the new data. |
| 179 | func (s *ContextStore) ResetEndpointTLSMaterial(contextName string, endpointName string, data *EndpointTLSData) error { |
| 180 | if err := s.tls.removeEndpoint(contextName, endpointName); err != nil { |
| 181 | return err |
| 182 | } |
| 183 | if data == nil { |
| 184 | return nil |
| 185 | } |
| 186 | for fileName, data := range data.Files { |
| 187 | if err := s.tls.createOrUpdate(contextName, endpointName, fileName, data); err != nil { |
| 188 | return err |
| 189 | } |
| 190 | } |
| 191 | return nil |
| 192 | } |
| 193 | |
| 194 | // ListTLSFiles returns the list of TLS files present for each endpoint in the |
| 195 | // context. |
nothing calls this directly
no test coverage detected