crontab

package
v0.1.28 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrRegistryRequired    = errors.New("crontab registry is required")
	ErrTemplateNotFound    = errors.New("crontab template not found")
	ErrTemplateDisabled    = errors.New("crontab template disabled")
	ErrDynamicNotAllowed   = errors.New("crontab template does not allow dynamic")
	ErrEntryNotFound       = errors.New("crontab entry not found")
	ErrLocalHandlerMissing = errors.New("crontab local handler missing")
	ErrJobRunning          = errors.New("crontab job is already running")
	ErrRunLimitReached     = errors.New("crontab run limit reached")
)

Functions

func ContextWithEntry

func ContextWithEntry(ctx context.Context, entry Entry) context.Context

func ContextWithRunContext

func ContextWithRunContext(ctx context.Context, run *RunContext) context.Context

func Dispatch

func Dispatch(ctx context.Context, entry *Entry) error

func MustRegister

func MustRegister(templates ...Template)

func NextRuns

func NextRuns(spec string, n int) ([]time.Time, error)

func Register

func Register(templates ...Template) error

func UseFailureHandler

func UseFailureHandler(handlers ...FailureHandler)

func ValidateSpec

func ValidateSpec(spec string) error

func WithJobLogger

func WithJobLogger(ctx context.Context, logger JobLogger) context.Context

Types

type BatchLogger

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

func NewBatchLogger

func NewBatchLogger(writer LogWriter, batchSize int, flushInterval time.Duration) *BatchLogger

func (*BatchLogger) Start

func (b *BatchLogger) Start(ctx context.Context)

func (*BatchLogger) Stop

func (b *BatchLogger) Stop(ctx context.Context) error

func (*BatchLogger) Write

func (b *BatchLogger) Write(ctx context.Context, log RunLog) error

func (*BatchLogger) WriteBatch

func (b *BatchLogger) WriteBatch(ctx context.Context, logs []RunLog) error

type BuiltinLoader

type BuiltinLoader struct {
	Entries []Entry
}

func (BuiltinLoader) Load

func (l BuiltinLoader) Load(ctx context.Context) ([]Entry, error)

type Config

type Config struct {
	Enabled        bool          `mapstructure:"enabled" yaml:"enabled"`
	Driver         string        `mapstructure:"driver" yaml:"driver"` // robfig | asynq
	ReloadInterval time.Duration `mapstructure:"reload_interval" yaml:"reload_interval"`
	InstanceID     string        `mapstructure:"instance_id" yaml:"instance_id"`

	Lock LockConfig `mapstructure:"lock" yaml:"lock"`
	Log  LogConfig  `mapstructure:"log" yaml:"log"`
}

func DefaultConfig

func DefaultConfig() Config

type CreateEntryRequest

type CreateEntryRequest struct {
	Name        string
	TemplateKey string
	Spec        string
	Payload     string
	Enabled     bool
	Timeout     time.Duration
	Distributed bool
	LockTTL     time.Duration
	LockKey     string
	MaxRunCount int64
}

type DatabaseLoader

type DatabaseLoader struct {
	Repo EntryRepository
}

func (DatabaseLoader) Load

func (l DatabaseLoader) Load(ctx context.Context) ([]Entry, error)

type Entry

type Entry struct {
	ID          string
	Name        string
	TemplateKey string

	Spec    string
	Payload string
	Source  Source

	Enabled bool

	Timeout time.Duration

	Distributed bool
	LockTTL     time.Duration
	LockKey     string

	MaxRunCount int64
}

func EntryFromContext

func EntryFromContext(ctx context.Context) (Entry, bool)

func JobToEntry

func JobToEntry(j Job) Entry

type EntryInfo

type EntryInfo struct {
	ID           string        `json:"id"`
	Name         string        `json:"name"`
	TemplateKey  string        `json:"template_key"`
	Spec         string        `json:"spec"`
	Payload      string        `json:"payload"`
	Source       Source        `json:"source"`
	Mode         Mode          `json:"mode"`
	Enabled      bool          `json:"enabled"`
	Timeout      time.Duration `json:"timeout"`
	Distributed  bool          `json:"distributed"`
	LockTTL      time.Duration `json:"lock_ttl"`
	LockKey      string        `json:"lock_key"`
	LastStatus   Status        `json:"last_status"`
	LastRunAt    int64         `json:"last_run_at"`
	NextRunAt    int64         `json:"next_run_at"`
	LastError    string        `json:"last_error"`
	RunCount     int64         `json:"run_count"`
	MaxRunCount  int64         `json:"max_run_count"`
	SuccessCount int64         `json:"success_count"`
	FailCount    int64         `json:"fail_count"`
	SkipCount    int64         `json:"skip_count"`
}

type EntryRepository

type EntryRepository interface {
	ListEnabled(ctx context.Context) ([]Entry, error)
	ListEntries(ctx context.Context) ([]EntryInfo, error)
	GetEntry(ctx context.Context, id string) (EntryInfo, error)
	Create(ctx context.Context, entry Entry) (EntryInfo, error)
	Update(ctx context.Context, entry Entry) error
	Delete(ctx context.Context, id string) error
	UpdateEnabled(ctx context.Context, id string, enabled bool) error
	ListRuns(ctx context.Context, filter RunFilter) ([]RunLog, error)
}

type FailureHandler

type FailureHandler func(ctx context.Context, report FailureReport)

type FailureReport

type FailureReport struct {
	EntryID     string
	TemplateKey string
	StartedAt   time.Time
	FinishedAt  time.Time
	Duration    time.Duration
	TraceID     string
	Error       error
}

type Job

type Job struct {
	ID     string
	Name   string
	Label  string
	Spec   string
	Source Source
	Mode   Mode

	Enabled bool

	Payload  string
	Queue    string
	TaskType string

	Timeout     time.Duration
	Distributed bool
	LockTTL     time.Duration
	LockKey     string

	MaxRunCount int64
}

func EntryToJob

func EntryToJob(e Entry) Job

type JobLogger

type JobLogger interface {
	Info(msg string, fields ...any)
	Warn(msg string, fields ...any)
	Error(msg string, fields ...any)
}

func JobLoggerFromContext

func JobLoggerFromContext(ctx context.Context) JobLogger

type JobStatus

type JobStatus struct {
	ID          string
	Name        string
	Label       string
	Source      Source
	Mode        Mode
	Spec        string
	Enabled     bool
	Running     bool
	LastStatus  Status
	LastRunAt   int64
	NextRunAt   int64
	RunCount    int64
	MaxRunCount int64
	FailCount   int64
	LastError   string
}

type Loader

type Loader interface {
	Load(ctx context.Context) ([]Entry, error)
}

type Lock

type Lock interface {
	Release(ctx context.Context) error
	Unlock(ctx context.Context) error
	Refresh(ctx context.Context, ttl time.Duration) error
}

type LockConfig

type LockConfig struct {
	Enabled bool          `mapstructure:"enabled" yaml:"enabled"`
	TTL     time.Duration `mapstructure:"ttl" yaml:"ttl"`
}

type Locker

type Locker interface {
	Acquire(ctx context.Context, key string, ttl time.Duration) (Lock, bool, error)
	TryLock(ctx context.Context, key string, ttl time.Duration) (Lock, bool, error)
}

type LogConfig

type LogConfig struct {
	Enabled       bool          `mapstructure:"enabled" yaml:"enabled"`
	Batch         bool          `mapstructure:"batch" yaml:"batch"`
	BatchSize     int           `mapstructure:"batch_size" yaml:"batch_size"`
	FlushInterval time.Duration `mapstructure:"flush_interval" yaml:"flush_interval"`
}

type LogEvent

type LogEvent struct {
	RunID       string         `json:"run_id"`
	EntryID     string         `json:"entry_id"`
	TemplateKey string         `json:"template_key"`
	TrackID     string         `json:"track_id"`
	Level       LogLevel       `json:"level"`
	Message     string         `json:"message"`
	Fields      map[string]any `json:"fields"`
	Time        time.Time      `json:"time"`
}

type LogFilter

type LogFilter struct {
	RunID   string
	EntryID string
}

type LogLevel

type LogLevel string
const (
	LogInfo  LogLevel = "info"
	LogWarn  LogLevel = "warn"
	LogError LogLevel = "error"
)

type LogStore

type LogStore interface {
	Append(ctx context.Context, event LogEvent) error
	ListRunLogs(ctx context.Context, filter RunLogFilter) ([]LogEvent, error)
}

type LogStreamer

type LogStreamer interface {
	Subscribe(ctx context.Context, filter LogFilter) (<-chan LogEvent, error)
	Publish(ctx context.Context, event LogEvent) error
}

type LogWriter

type LogWriter interface {
	Write(ctx context.Context, log RunLog) error
	WriteBatch(ctx context.Context, logs []RunLog) error
}

type Manager

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

func New

func New(opts ManagerOptions) (*Manager, error)

func NewManager

func NewManager(opts ManagerOptions) (*Manager, error)

func (*Manager) Config

func (m *Manager) Config() Config

func (*Manager) CreateEntry

func (m *Manager) CreateEntry(ctx context.Context, req CreateEntryRequest) (EntryInfo, error)

func (*Manager) DeleteEntry

func (m *Manager) DeleteEntry(ctx context.Context, id string) error

func (*Manager) Disable

func (m *Manager) Disable(ctx context.Context, name string) error

func (*Manager) DisableEntry

func (m *Manager) DisableEntry(ctx context.Context, id string) error

func (*Manager) Enable

func (m *Manager) Enable(ctx context.Context, name string) error

func (*Manager) EnableEntry

func (m *Manager) EnableEntry(ctx context.Context, id string) error

func (*Manager) GetEntry

func (m *Manager) GetEntry(ctx context.Context, id string) (EntryInfo, error)

func (*Manager) GetRuntime

func (m *Manager) GetRuntime(ctx context.Context, id string) (RuntimeInfo, error)

func (*Manager) List

func (m *Manager) List(ctx context.Context) ([]JobStatus, error)

func (*Manager) ListDBTemplates

func (m *Manager) ListDBTemplates(ctx context.Context) ([]TemplateInfo, error)

func (*Manager) ListEntries

func (m *Manager) ListEntries(ctx context.Context) ([]EntryInfo, error)

func (*Manager) ListRunLogs

func (m *Manager) ListRunLogs(ctx context.Context, filter RunLogFilter) ([]LogEvent, error)

func (*Manager) ListRuns

func (m *Manager) ListRuns(ctx context.Context, filter RunFilter) ([]RunLog, error)

func (*Manager) ListRuntime

func (m *Manager) ListRuntime(ctx context.Context) ([]RuntimeInfo, error)

func (*Manager) ListTemplates

func (m *Manager) ListTemplates(ctx context.Context) ([]TemplateInfo, error)

func (*Manager) Logs

func (m *Manager) Logs(ctx context.Context, name string, limit int) ([]RunLog, error)

func (*Manager) Reload

func (m *Manager) Reload(ctx context.Context) error

func (*Manager) RunNow

func (m *Manager) RunNow(ctx context.Context, name string) error

func (*Manager) RunOnce

func (m *Manager) RunOnce(ctx context.Context, req RunOnceRequest) error

func (*Manager) Runner

func (m *Manager) Runner() *Runner

func (*Manager) Shutdown

func (m *Manager) Shutdown(ctx context.Context) error

func (*Manager) Start

func (m *Manager) Start(ctx context.Context) error

func (*Manager) Status

func (m *Manager) Status(ctx context.Context) ([]JobStatus, error)

func (*Manager) Stop

func (m *Manager) Stop(ctx context.Context) error

func (*Manager) StreamLogs

func (m *Manager) StreamLogs(ctx context.Context, filter LogFilter) (<-chan LogEvent, error)

func (*Manager) UpdateEntry

func (m *Manager) UpdateEntry(ctx context.Context, id string, req UpdateEntryRequest) error

type ManagerOptions

type ManagerOptions struct {
	Config        Config
	Registry      *Registry
	Store         Store
	Scheduler     Scheduler
	Locker        Locker
	Logger        LogWriter
	Repository    EntryRepository
	Runner        *Runner
	Runtime       *RuntimeState
	LogStore      LogStore
	Streamer      LogStreamer
	RuntimeLogger *zap.Logger
}

type MemoryLogStreamer

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

func NewMemoryLogStreamer

func NewMemoryLogStreamer() *MemoryLogStreamer

func (*MemoryLogStreamer) Publish

func (s *MemoryLogStreamer) Publish(ctx context.Context, event LogEvent) error

func (*MemoryLogStreamer) Subscribe

func (s *MemoryLogStreamer) Subscribe(ctx context.Context, filter LogFilter) (<-chan LogEvent, error)

type Mode

type Mode string
const (
	ModeLocal Mode = "local"
)

type NoopJobLogger

type NoopJobLogger struct{}

func (NoopJobLogger) Error

func (NoopJobLogger) Error(msg string, fields ...any)

func (NoopJobLogger) Info

func (NoopJobLogger) Info(msg string, fields ...any)

func (NoopJobLogger) Warn

func (NoopJobLogger) Warn(msg string, fields ...any)

type NoopLocker

type NoopLocker struct{}

func (NoopLocker) Acquire

func (NoopLocker) Acquire(ctx context.Context, key string, ttl time.Duration) (Lock, bool, error)

func (NoopLocker) TryLock

func (NoopLocker) TryLock(ctx context.Context, key string, ttl time.Duration) (Lock, bool, error)

type NoopLogWriter

type NoopLogWriter struct{}

func (NoopLogWriter) Write

func (NoopLogWriter) Write(ctx context.Context, log RunLog) error

func (NoopLogWriter) WriteBatch

func (NoopLogWriter) WriteBatch(ctx context.Context, logs []RunLog) error

type NoopStore

type NoopStore struct{}

func (NoopStore) Disable

func (NoopStore) Disable(ctx context.Context, name string) error

func (NoopStore) Enable

func (NoopStore) Enable(ctx context.Context, name string) error

func (NoopStore) ListEnabledJobs

func (NoopStore) ListEnabledJobs(ctx context.Context) ([]Job, error)

func (NoopStore) ListJobs

func (NoopStore) ListJobs(ctx context.Context) ([]JobStatus, error)

func (NoopStore) Logs

func (NoopStore) Logs(ctx context.Context, name string, limit int) ([]RunLog, error)

func (NoopStore) MarkFinished

func (NoopStore) MarkFinished(ctx context.Context, log RunLog) error

func (NoopStore) MarkRunning

func (NoopStore) MarkRunning(ctx context.Context, log RunLog) error

type Options

type Options struct {
	WithSeconds     bool
	AutoLoadDB      bool
	Distributed     bool
	Locker          Locker
	ShutdownTimeout time.Duration
	StrictLoad      bool
}

func DefaultOptions

func DefaultOptions() Options

type Registry

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

func NewRegistry

func NewRegistry() *Registry

func (*Registry) BuiltinJobs

func (r *Registry) BuiltinJobs() []Job

func (*Registry) Dispatch

func (r *Registry) Dispatch(ctx context.Context, entry *Entry) error

func (*Registry) Get

func (r *Registry) Get(name string) (Template, bool)

func (*Registry) List

func (r *Registry) List() []Template

func (*Registry) ListDBTemplateInfo

func (r *Registry) ListDBTemplateInfo() []TemplateInfo

func (*Registry) ListTemplateInfo

func (r *Registry) ListTemplateInfo() []TemplateInfo

func (*Registry) MustRegister

func (r *Registry) MustRegister(t Template)

func (*Registry) Register

func (r *Registry) Register(t Template) error

func (*Registry) RegisterAll

func (r *Registry) RegisterAll(templates ...Template) error

func (*Registry) ValidateJob

func (r *Registry) ValidateJob(job Job) (Template, error)

type RunContext

type RunContext struct {
	Job        Job
	Template   Template
	Entry      Entry
	RunID      string
	StartedAt  time.Time
	InstanceID string
	Result     RunResult
	// contains filtered or unexported fields
}

func RunContextFromContext

func RunContextFromContext(ctx context.Context) (*RunContext, bool)

func (*RunContext) Context

func (c *RunContext) Context() context.Context

func (*RunContext) SetContext

func (c *RunContext) SetContext(ctx context.Context)

type RunFilter

type RunFilter struct {
	EntryID     string
	TemplateKey string
	Status      Status
	Limit       int
}

type RunHandler

type RunHandler func(*RunContext) RunResult

func RunHandlerFromFunc

func RunHandlerFromFunc(handler func(context.Context, Job) error) RunHandler

type RunLog

type RunLog struct {
	JobID   string
	JobName string
	RunID   string

	Source Source
	Mode   Mode
	Spec   string

	Queue    string
	TaskType string
	Payload  string
	TrackID  string

	Status     Status
	StartedAt  int64
	FinishedAt int64
	DurationMs int64

	Error      string
	PanicStack string

	Host       string
	InstanceID string
}

type RunLogFilter

type RunLogFilter struct {
	RunID   string
	EntryID string
	Limit   int
}

type RunOnceRequest

type RunOnceRequest struct {
	EntryID     string
	TemplateKey string
	Payload     string
	Timeout     time.Duration
	LockKey     string
}

type RunResult

type RunResult struct {
	Status     Status
	Err        error
	PanicStack string
}

type Runner

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

func NewRunner

func NewRunner(opts RunnerOptions) *Runner

func (*Runner) LastRunStatus

func (r *Runner) LastRunStatus(jobID string) Status

func (*Runner) Run

func (r *Runner) Run(ctx context.Context, job Job)

func (*Runner) RunResult

func (r *Runner) RunResult(ctx context.Context, job Job) RunResult

type RunnerOptions

type RunnerOptions struct {
	Config        Config
	Registry      *Registry
	Store         Store
	Locker        Locker
	Logger        LogWriter
	LogStore      LogStore
	Streamer      LogStreamer
	RuntimeLogger *zap.Logger
	Runtime       *RuntimeState
}

type Runtime

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

func NewRuntime

func NewRuntime(registry *Registry) *Runtime

func (*Runtime) Dispatch

func (rt *Runtime) Dispatch(ctx context.Context, entry *Entry) error

type RuntimeInfo

type RuntimeInfo struct {
	EntryID      string        `json:"entry_id"`
	TemplateKey  string        `json:"template_key"`
	Status       RuntimeStatus `json:"status"`
	PrevTime     time.Time     `json:"prev_time"`
	NextTime     time.Time     `json:"next_time"`
	LastStartAt  time.Time     `json:"last_start_at"`
	LastEndAt    time.Time     `json:"last_end_at"`
	LastDuration time.Duration `json:"last_duration"`
	LastError    string        `json:"last_error"`
	RunCount     int64         `json:"run_count"`
	SuccessCount int64         `json:"success_count"`
	FailCount    int64         `json:"fail_count"`
	SkipCount    int64         `json:"skip_count"`
}

type RuntimeMetrics

type RuntimeMetrics struct {
	CrontabExecuteTotal        int64         `json:"crontab_execute_total"`
	CrontabExecuteSuccessTotal int64         `json:"crontab_execute_success_total"`
	CrontabExecuteFailedTotal  int64         `json:"crontab_execute_failed_total"`
	CrontabExecuteDuration     time.Duration `json:"crontab_execute_duration"`
	CrontabOverlapSkippedTotal int64         `json:"crontab_overlap_skipped_total"`
	CrontabTimeoutTotal        int64         `json:"crontab_timeout_total"`
}

func RuntimeMetricsSnapshot

func RuntimeMetricsSnapshot() RuntimeMetrics

type RuntimeState

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

func NewRuntimeState

func NewRuntimeState() *RuntimeState

func (*RuntimeState) Get

func (s *RuntimeState) Get(id string) (RuntimeInfo, bool)

func (*RuntimeState) List

func (s *RuntimeState) List() []RuntimeInfo

func (*RuntimeState) MarkFinished

func (s *RuntimeState) MarkFinished(entry Entry, status RuntimeStatus, started, ended time.Time, err error)

func (*RuntimeState) MarkRunning

func (s *RuntimeState) MarkRunning(entry Entry, started time.Time)

func (*RuntimeState) SetSchedule

func (s *RuntimeState) SetSchedule(entries []Entry)

type RuntimeStatus

type RuntimeStatus string
const (
	RuntimeWaiting  RuntimeStatus = "waiting"
	RuntimeRunning  RuntimeStatus = "running"
	RuntimeSuccess  RuntimeStatus = "success"
	RuntimeFailed   RuntimeStatus = "failed"
	RuntimeSkipped  RuntimeStatus = "skipped"
	RuntimeDisabled RuntimeStatus = "disabled"
)

type Scheduler

type Scheduler interface {
	Name() string
	Start(ctx context.Context) error
	Stop(ctx context.Context) error
	Reload(ctx context.Context, jobs []Job) error
}

type Service

type Service interface {
	Start(ctx context.Context) error
	Shutdown(ctx context.Context) error
	Reload(ctx context.Context) error

	ListTemplates(ctx context.Context) ([]TemplateInfo, error)
	ListDBTemplates(ctx context.Context) ([]TemplateInfo, error)

	ListEntries(ctx context.Context) ([]EntryInfo, error)
	GetEntry(ctx context.Context, id string) (EntryInfo, error)

	CreateEntry(ctx context.Context, req CreateEntryRequest) (EntryInfo, error)
	UpdateEntry(ctx context.Context, id string, req UpdateEntryRequest) error
	DeleteEntry(ctx context.Context, id string) error

	EnableEntry(ctx context.Context, id string) error
	DisableEntry(ctx context.Context, id string) error

	RunOnce(ctx context.Context, req RunOnceRequest) error

	ListRuntime(ctx context.Context) ([]RuntimeInfo, error)
	GetRuntime(ctx context.Context, id string) (RuntimeInfo, error)

	ListRuns(ctx context.Context, filter RunFilter) ([]RunLog, error)
	ListRunLogs(ctx context.Context, filter RunLogFilter) ([]LogEvent, error)
	StreamLogs(ctx context.Context, filter LogFilter) (<-chan LogEvent, error)
}

type Source

type Source string
const (
	SourceBuiltin Source = "builtin"
	SourceDynamic Source = "dynamic"
	SourceDB      Source = "db"
	SourceManual  Source = "manual"
)

type Status

type Status string
const (
	StatusPending          Status = "pending"
	StatusRunning          Status = "running"
	StatusSuccess          Status = "success"
	StatusFailed           Status = "failed"
	StatusSkipped          Status = "skipped"
	StatusTimeout          Status = "timeout"
	StatusPanic            Status = "panic"
	StatusLocked           Status = "locked"
	StatusDisabled         Status = "disabled"
	StatusTemplateMissing  Status = "template_missing"
	StatusTemplateDisabled Status = "template_disabled"
)

type Store

type Store interface {
	ListEnabledJobs(ctx context.Context) ([]Job, error)
	ListJobs(ctx context.Context) ([]JobStatus, error)
	MarkRunning(ctx context.Context, log RunLog) error
	MarkFinished(ctx context.Context, log RunLog) error
	Enable(ctx context.Context, name string) error
	Disable(ctx context.Context, name string) error
	Logs(ctx context.Context, name string, limit int) ([]RunLog, error)
}

type Template

type Template struct {
	Key          string
	Name         string
	Desc         string
	Spec         string
	Enabled      bool
	AllowDB      bool
	AllowOverlap bool
	LogDisabled  bool
	Timeout      time.Duration
	Handler      RunHandler

	DefaultPayload string
	PayloadFormat  string
	PayloadSchema  string
}

type TemplateInfo

type TemplateInfo struct {
	Key             string        `json:"key"`
	Name            string        `json:"name"`
	Label           string        `json:"label"`
	Desc            string        `json:"desc"`
	Description     string        `json:"description"`
	Spec            string        `json:"spec"`
	Mode            string        `json:"mode"`
	Enabled         bool          `json:"enabled"`
	AllowBuiltin    bool          `json:"allow_builtin"`
	AllowDB         bool          `json:"allow_db"`
	AllowOverlap    bool          `json:"allow_overlap"`
	LogDisabled     bool          `json:"log_disabled"`
	DefaultSpec     string        `json:"default_spec"`
	DefaultPayload  string        `json:"default_payload"`
	DefaultQueue    string        `json:"default_queue"`
	DefaultTaskType string        `json:"default_task_type"`
	PayloadFormat   string        `json:"payload_format"`
	PayloadSchema   string        `json:"payload_schema"`
	Timeout         time.Duration `json:"timeout"`
	TimeoutSec      int           `json:"timeout_sec"`
}

type UpdateEntryRequest

type UpdateEntryRequest struct {
	Name        string
	TemplateKey string
	Spec        string
	Payload     string
	Enabled     bool
	Timeout     time.Duration
	Distributed bool
	LockTTL     time.Duration
	LockKey     string
	MaxRunCount int64
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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