Split the context store interface
This is to make it easier to implement support for exporting contexts in 3rd party code, or to create mocks in tests. 2 exemples where it simplify things: - docker-app desktop-specific context decorator (which rewrites parts of the docker context to simplify UX when using on Docker Desktop contexts) - ucp for including a context in the connection bundle Signed-off-by: Simon Ferquel <simon.ferquel@docker.com>
This commit is contained in:
@ -31,7 +31,7 @@ type Endpoint struct {
|
||||
}
|
||||
|
||||
// WithTLSData loads TLS materials for the endpoint
|
||||
func WithTLSData(s store.Store, contextName string, m EndpointMeta) (Endpoint, error) {
|
||||
func WithTLSData(s store.Reader, contextName string, m EndpointMeta) (Endpoint, error) {
|
||||
tlsData, err := context.LoadTLSData(s, contextName, DockerEndpoint)
|
||||
if err != nil {
|
||||
return Endpoint{}, err
|
||||
|
||||
Reference in New Issue
Block a user