From 5c51a9bdafda4987ab7da52b816e01ea6b56502d Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Thu, 11 Mar 2021 11:14:41 +0100 Subject: Endpoint configuration as Map This patch rewrites the endpoint configuration format to be a map. The problem here is, that a list of endpoints cannot easily be used with layered configuration, where a part of the configuration lives in the XDG config home of the user and the rest lives in the repository. With this patch, the endpoints are configured with a map instead of an array, which makes it less complicated to overwrite. The name of an endpoint is now the key in the map. A type `EndpointName` was introduced to take advantage of strong typing. Thus, the patch touches a bit more code to adapt to the new type in use. Signed-off-by: Matthias Beyer Tested-by: Matthias Beyer --- examples/packages/repo/config.toml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'examples') diff --git a/examples/packages/repo/config.toml b/examples/packages/repo/config.toml index 34fb996..5701f5c 100644 --- a/examples/packages/repo/config.toml +++ b/examples/packages/repo/config.toml @@ -40,11 +40,9 @@ images = [ "debian:bullseye" ] verify_images_present = true # -# List of docker endpoints +# Docker endpoints # - -[[docker.endpoints]] -name = "testhostname" +[docker.endpoints.testhostname] uri = "http://0.0.0.0:8095" # the URI of the endpoint. Either http or socket path endpoint_type = "http" # either "http" or "socket" speed = 1 # currently ignored, but required to be present -- cgit v1.2.3