Help us shape the future of Go! Take the 2026 Go Developer Survey

reflection

package
v1.48.1 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleReflectionStatus

func HandleReflectionStatus(w http.ResponseWriter, r *http.Request)

HandleReflectionStatus returns the current reflection scheduler status

func HandleReflectionTrigger

func HandleReflectionTrigger(w http.ResponseWriter, r *http.Request)

HandleReflectionTrigger manually triggers a reflection session

func RegisterRoutes

func RegisterRoutes(mux *http.ServeMux)

RegisterRoutes registers reflection HTTP handlers on the given mux

Types

type ReflectionScheduler

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

func GetGlobalReflection

func GetGlobalReflection() *ReflectionScheduler

GetGlobalReflection returns the global reflection scheduler (nil if not initialized)

func GetReflectionScheduler

func GetReflectionScheduler(cfg *config.ReflectionConfig) *ReflectionScheduler

GetReflectionScheduler returns the global reflection scheduler instance

func (*ReflectionScheduler) GetStatus

func (r *ReflectionScheduler) GetStatus() ReflectionStatus

GetStatus returns current reflection scheduler status

func (*ReflectionScheduler) IsRunning

func (r *ReflectionScheduler) IsRunning() bool

IsRunning returns whether the reflection scheduler is running

func (*ReflectionScheduler) SetDatabase

func (r *ReflectionScheduler) SetDatabase(db *sql.DB)

SetDatabase sets the database connection

func (*ReflectionScheduler) Start

func (r *ReflectionScheduler) Start() error

Start begins the reflection scheduler

func (*ReflectionScheduler) Stop

func (r *ReflectionScheduler) Stop()

Stop gracefully stops the reflection scheduler

func (*ReflectionScheduler) TriggerReflection

func (r *ReflectionScheduler) TriggerReflection() error

TriggerReflection manually triggers a reflection (for API endpoint)

func (*ReflectionScheduler) UpdateConfig

func (r *ReflectionScheduler) UpdateConfig(cfg *config.ReflectionConfig) error

UpdateConfig updates the reflection configuration (must be called when stopped)

type ReflectionStatus

type ReflectionStatus struct {
	Enabled           bool                     `json:"enabled"`
	Running           bool                     `json:"running"`
	LastReflection    *time.Time               `json:"last_reflection,omitempty"`
	ConversationCount int                      `json:"conversation_count"`
	Config            *config.ReflectionConfig `json:"config"`
}

Jump to

Keyboard shortcuts

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