mirror of https://github.com/docker/compose.git
11339761ca
Initially we stored the context data in the `Metadata` of the context but in hindsight this data would be better of in the `Endpoints` because that's what it is used for. Before: ```json { "Name": "aci", "Metadata": { "Type": "aci", "Data": { "key": "value" } }, "Endpoints": { "docker": {} } } ``` After: ```json { "Name": "aci", "Type": "aci", "Metadata": {}, "Endpoints": { "aci": { "key": "value" }, "docker": {} } } ``` With this change the contexts that we create are more in line with the contexts the docker cli creates. It also makes the code less complicated since we don't need to marsal twice any more. The API is nicer too: ```go // Get a context: c, err := store.Get(contextName) // Get the stored endpoint: var aciContext store.AciContext if err := contextStore.GetEndpoint(currentContext, &aciContext); err != nil { return nil, err } ``` |
||
---|---|---|
.. | ||
client.go |