console

package
v0.0.0-20260608 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

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

Event represents a scheduled task.

func (*Event) Cron

func (e *Event) Cron(expression string) *Event

Cron sets a custom cron expression.

func (*Event) EveryMinute

func (e *Event) EveryMinute() *Event

EveryMinute schedules the event to run every minute.

func (*Event) Hourly

func (e *Event) Hourly() *Event

Hourly schedules the event to run hourly.

func (*Event) WithoutOverlapping

func (e *Event) WithoutOverlapping() *Event

WithoutOverlapping ensures the task does not overlap itself.

type Kernel

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

Kernel handles incoming console commands.

func NewKernel

func NewKernel(app *foundation.Application) *Kernel

NewKernel creates a new Console Kernel.

func (*Kernel) RegisterCommand

func (k *Kernel) RegisterCommand(cmd *cobra.Command)

RegisterCommand registers a cobra command.

func (*Kernel) Run

func (k *Kernel) Run()

Run executes the console kernel.

type Schedule

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

Schedule manages registered tasks.

func NewSchedule

func NewSchedule() *Schedule

NewSchedule creates a new Schedule instance.

func (*Schedule) Command

func (s *Schedule) Command(command string) *Event

Command registers a new scheduled command.

func (*Schedule) Run

func (s *Schedule) Run(ctx context.Context)

Run executes the scheduler blocking the current thread. It stops when the context is cancelled.

Jump to

Keyboard shortcuts

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