Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewClusterAdapter ¶
func NewClusterAdapter(uc *usecase.ClusterUseCase) *clusterUseCaseAdapter
NewClusterAdapter wires the production ClusterUseCase for scheduler use.
Types ¶
type IDLister ¶
IDLister is the scheduler's read-side dependency. Adapter above is the production wiring; tests pass an in-memory stub.
type Options ¶
type Options struct {
Interval time.Duration
IterTimeout time.Duration
Logger *slog.Logger
Clock func() time.Time
}
Options configures the scheduler; all optional.
type RefreshDiscoveryScheduler ¶
type RefreshDiscoveryScheduler struct {
// contains filtered or unexported fields
}
RefreshDiscoveryScheduler runs ClusterUseCase.RefreshDiscovery on every registered cluster at a fixed interval. Phase 7 of F8 follow-up: catches node_architectures drift that would otherwise accumulate between manual Refresh Discovery clicks in the admin UI.
func NewRefreshDiscoveryScheduler ¶
func NewRefreshDiscoveryScheduler(lister IDLister, runner RefreshRunner, opts Options) *RefreshDiscoveryScheduler
NewRefreshDiscoveryScheduler constructs a scheduler. interval defaults to 24h; iterTimeout defaults to 5m; clock defaults to time.Now.
func (*RefreshDiscoveryScheduler) Start ¶
func (s *RefreshDiscoveryScheduler) Start(ctx context.Context)
Start blocks until ctx is canceled, running an iteration every interval. The first iteration runs immediately on Start so fresh deployments don't wait a full interval for initial discovery.
type RefreshRunner ¶
RefreshRunner is the subset of ClusterUseCase the scheduler calls per cluster. Mirrors `ClusterUseCase.RefreshDiscovery(ctx, id)`.
type RotationRestarter ¶
type RotationRestarter interface {
RestartForProvider(ctx context.Context, clusterID, namespace, provider string) error
}
RotationRestarter 는 회전 성공 후 소비자 재시작을 담당한다.
type TokenRotationScheduler ¶
type TokenRotationScheduler struct {
// contains filtered or unexported fields
}
func (*TokenRotationScheduler) Start ¶
func (s *TokenRotationScheduler) Start(ctx context.Context)
func (*TokenRotationScheduler) WithRestarter ¶
func (s *TokenRotationScheduler) WithRestarter(r RotationRestarter) *TokenRotationScheduler
WithRestarter 는 회전 후 반영 단계를 활성화한다.