scheduler

package
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 30, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package scheduler 는 스택 경보 수집 주기다(nullus-plan#87). 골격은 백업 · 토큰 회전 스케줄러를 따른다.

Index

Constants

View Source
const (
	// DefaultStackAlertInterval 은 기본 수집 주기다. 경보 전달이 이만큼 늦을 수 있다.
	DefaultStackAlertInterval = time.Minute
)

Variables

This section is empty.

Functions

func ParseStackAlertInterval

func ParseStackAlertInterval(raw string) time.Duration

ParseStackAlertInterval 은 NULLUS_STACK_ALERT_INTERVAL 이다. 비면 1분, "0"·"off" 면 끈다(0), 읽을 수 없으면 기본값, 10초보다 짧으면 10초다.

Types

type Collector

type Collector interface {
	Run(ctx context.Context) (usecase.CollectResult, error)
}

Collector 는 한 번의 수집이다(usecase.CollectStackAlerts).

type StackAlertScheduler

type StackAlertScheduler struct {
	// contains filtered or unexported fields
}

func NewStackAlertScheduler

func NewStackAlertScheduler(collector Collector, interval time.Duration, logger *slog.Logger) *StackAlertScheduler

func (*StackAlertScheduler) Start

func (s *StackAlertScheduler) Start(ctx context.Context)

Start 는 바로 한 번 돌고 주기마다 돈다. ctx 가 끝나면 멈춘다.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL