From 461f22716995e51db40519312f49f08fd18d9e21 Mon Sep 17 00:00:00 2001 From: Chewing_Bever Date: Wed, 22 Jun 2022 09:18:47 +0200 Subject: [PATCH] refactor: use new module names --- src/build/build.v | 22 +++++++++++----------- src/console/logs/logs.v | 2 +- src/console/targets/build.v | 2 +- src/console/targets/targets.v | 2 +- src/cron/cli.v | 2 +- src/cron/daemon/daemon.v | 2 +- src/server/cli.v | 2 +- src/v.mod | 4 ++-- 8 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/build/build.v b/src/build/build.v index 6688296..2ad70a6 100644 --- a/src/build/build.v +++ b/src/build/build.v @@ -1,6 +1,6 @@ module build -import vieter.vdocker as docker +import vieter_v.docker import encoding.base64 import time import os @@ -59,13 +59,13 @@ pub fn create_build_image(base_image string) ?string { // We pull the provided image dd.pull_image(image_name, image_tag)? - id := dd.create_container(c)?.id + id := dd.container_create(c)?.id // id := docker.create_container(c)? - dd.start_container(id)? + dd.container_start(id)? // This loop waits until the container has stopped, so we can remove it after for { - data := dd.inspect_container(id)? + data := dd.container_inspect(id)? if !data.state.running { break @@ -80,7 +80,7 @@ pub fn create_build_image(base_image string) ?string { // conflicts. tag := time.sys_mono_now().str() image := dd.create_image_from_container(id, 'vieter-build', tag)? - dd.remove_container(id)? + dd.container_remove(id)? return image.id } @@ -125,25 +125,25 @@ pub fn build_target(address string, api_key string, base_image_id string, target user: '0:0' } - id := dd.create_container(c)?.id - dd.start_container(id)? + id := dd.container_create(c)?.id + dd.container_start(id)? - mut data := dd.inspect_container(id)? + mut data := dd.container_inspect(id)? // This loop waits until the container has stopped, so we can remove it after for data.state.running { time.sleep(1 * time.second) - data = dd.inspect_container(id)? + data = dd.container_inspect(id)? } - mut logs_stream := dd.get_container_logs(id)? + mut logs_stream := dd.container_get_logs(id)? // Read in the entire stream mut logs_builder := strings.new_builder(10 * 1024) util.reader_to_writer(mut logs_stream, mut logs_builder)? - dd.remove_container(id)? + dd.container_remove(id)? return BuildResult{ start_time: data.state.start_time diff --git a/src/console/logs/logs.v b/src/console/logs/logs.v index 5155ae8..0f023bc 100644 --- a/src/console/logs/logs.v +++ b/src/console/logs/logs.v @@ -1,7 +1,7 @@ module logs import cli -import vieter.vconf +import vieter_v.conf as vconf import client import console import time diff --git a/src/console/targets/build.v b/src/console/targets/build.v index 7403e2e..6337aa3 100644 --- a/src/console/targets/build.v +++ b/src/console/targets/build.v @@ -1,7 +1,7 @@ module targets import client -import vieter.vdocker as docker +import vieter_v.docker import os import build diff --git a/src/console/targets/targets.v b/src/console/targets/targets.v index ce1cd14..66d48fb 100644 --- a/src/console/targets/targets.v +++ b/src/console/targets/targets.v @@ -1,7 +1,7 @@ module targets import cli -import vieter.vconf +import vieter_v.conf as vconf import cron.expression { parse_expression } import client { NewTarget } import console diff --git a/src/cron/cli.v b/src/cron/cli.v index c2e3d39..4d95833 100644 --- a/src/cron/cli.v +++ b/src/cron/cli.v @@ -1,7 +1,7 @@ module cron import cli -import vieter.vconf +import vieter_v.conf as vconf struct Config { pub: diff --git a/src/cron/daemon/daemon.v b/src/cron/daemon/daemon.v index 0ab792a..934d35a 100644 --- a/src/cron/daemon/daemon.v +++ b/src/cron/daemon/daemon.v @@ -6,7 +6,7 @@ import datatypes { MinHeap } import cron.expression { CronExpression, parse_expression } import math import build -import vieter.vdocker as docker +import vieter_v.docker import os import client import models { Target } diff --git a/src/server/cli.v b/src/server/cli.v index a62f56e..6fd09c5 100644 --- a/src/server/cli.v +++ b/src/server/cli.v @@ -1,7 +1,7 @@ module server import cli -import vieter.vconf +import vieter_v.conf as vconf struct Config { pub: diff --git a/src/v.mod b/src/v.mod index 15e3518..5b89062 100644 --- a/src/v.mod +++ b/src/v.mod @@ -1,6 +1,6 @@ Module { dependencies: [ - 'https://git.rustybever.be/vieter/vconf', - 'https://git.rustybever.be/vieter/vdocker' + 'https://git.rustybever.be/vieter-v/conf', + 'https://git.rustybever.be/vieter-v/docker' ] }