api

package
v0.17.5 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2026 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StatusRunning     = "running"
	StatusCompleted   = "completed"
	StatusFailed      = "failed"
	StatusInterrupted = "interrupted"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Benchmark

type Benchmark struct {
	ID        string        `json:"id"`
	Name      string        `json:"name"`
	Status    string        `json:"status"`
	StartedAt time.Time     `json:"startedAt"`
	EndedAt   *time.Time    `json:"endedAt,omitempty"`
	Error     string        `json:"error,omitempty"`
	Request   bench.Request `json:"request"`
	Report    bench.Report  `json:"report"`
}

type File

type File struct {
	Path string `json:"path"`
	Size int64  `json:"size"`
}

type Service

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

func New

func New(dir string, logger *log.Logger) (*Service, error)

func (*Service) Cancel

func (s *Service) Cancel() <-chan struct{}

Cancel rejects new jobs and returns a channel closed after active jobs finish cleanup.

func (*Service) Register

func (s *Service) Register(mux *http.ServeMux)

Jump to

Keyboard shortcuts

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