tasklog

package
v0.0.30 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repository

type Repository interface {
	Create(ctx context.Context, log *TaskLog) error
	List(ctx context.Context, taskID string, taskIDs []string, limit, offset int) ([]*TaskLog, int, error)
	// DeleteByTaskID removes all task logs belonging to the given task.
	DeleteByTaskID(ctx context.Context, taskID string) (int, error)
	// CleanupOlderThan removes task log entries older than maxAge.
	// Returns the number of deleted entries.
	CleanupOlderThan(ctx context.Context, maxAge time.Duration) (int, error)
}

type Server

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

func NewServer

func NewServer(repo Repository, taskRepo task.Repository) *Server

type TaskLog

type TaskLog struct {
	ID        string            `yaml:"id"`
	TaskID    string            `yaml:"task_id"`
	Level     int32             `yaml:"level"`
	Category  int32             `yaml:"category"`
	Message   string            `yaml:"message"`
	Metadata  map[string]string `yaml:"metadata"`
	CreatedAt time.Time         `yaml:"created_at"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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