🏡 index : ironmagma/quintodrome.git

// Code generated by ndpgen. DO NOT EDIT.
//
// This file provides stub implementations for non-WASM platforms.
// It allows Go plugins to compile and run tests outside of WASM,
// but the actual functionality is only available in WASM builds.
//
//go:build !wasip1

package scheduler

// SchedulerCallbackRequest is the request provided when a scheduled task fires.
type SchedulerCallbackRequest struct {
	// ScheduleID is the unique identifier for this scheduled task.
	// This is either the ID provided when scheduling, or an auto-generated UUID if none was specified.
	ScheduleID string `json:"scheduleId"`
	// Payload is the payload data that was provided when the task was scheduled.
	// Can be used to pass context or parameters to the callback handler.
	Payload string `json:"payload"`
	// IsRecurring is true if this is a recurring schedule (created via ScheduleRecurring),
	// false if it's a one-time schedule (created via ScheduleOneTime).
	IsRecurring bool `json:"isRecurring"`
}

// Scheduler is the marker interface for scheduler plugins.
// Implement one or more of the provider interfaces below.
// SchedulerCallback provides scheduled task handling.
// This capability allows plugins to receive callbacks when their scheduled tasks execute.
// Plugins that use the scheduler host service must implement this capability
// to handle task execution.
type Scheduler interface{}

// CallbackProvider provides the OnCallback function.
type CallbackProvider interface {
	OnCallback(SchedulerCallbackRequest) error
}

// NotImplementedCode is the standard return code for unimplemented functions.
const NotImplementedCode int32 = -2

// Register is a no-op on non-WASM platforms.
// This stub allows code to compile outside of WASM.
func Register(_ Scheduler) {}