From f4901f606a78c3386841df823b18788d5de5f4fc Mon Sep 17 00:00:00 2001 From: hugoShaka Date: Tue, 3 Dec 2024 18:11:35 -0500 Subject: [PATCH] fix missing constants + add license --- lib/autoupdate/rollout/strategy_timebased.go | 23 +++++++++++++++++++ .../rollout/strategy_timebased_test.go | 18 +++++++++++++++ 2 files changed, 41 insertions(+) diff --git a/lib/autoupdate/rollout/strategy_timebased.go b/lib/autoupdate/rollout/strategy_timebased.go index 8a7ef32b3159b..dff2d74e5fba8 100644 --- a/lib/autoupdate/rollout/strategy_timebased.go +++ b/lib/autoupdate/rollout/strategy_timebased.go @@ -1,3 +1,21 @@ +/* + * Teleport + * Copyright (C) 2024 Gravitational, Inc. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + package rollout import ( @@ -11,6 +29,11 @@ import ( update "github.com/gravitational/teleport/api/types/autoupdate" ) +const ( + updateReasonInWindow = "in_window" + updateReasonOutsideWindow = "outside_window" +) + type timeBasedStrategy struct { log *slog.Logger clock clockwork.Clock diff --git a/lib/autoupdate/rollout/strategy_timebased_test.go b/lib/autoupdate/rollout/strategy_timebased_test.go index bee732b3a038d..91db29d42e469 100644 --- a/lib/autoupdate/rollout/strategy_timebased_test.go +++ b/lib/autoupdate/rollout/strategy_timebased_test.go @@ -1,3 +1,21 @@ +/* + * Teleport + * Copyright (C) 2024 Gravitational, Inc. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + package rollout import (