core

package
v0.15.6-rc4 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App added in v0.12.1

type App interface {
	Logger() *slog.Logger
	PathMaker() path.PathMaker
	ResourceRegistry() resources.Registry
	Conf() *common.Conf
	Migrating() bool
	PrinterMiddleware() func(next gox.Printer) gox.Printer
}

type Core

type Core = *core

func NewCore

func NewCore(door Door) Core

func (Core) App added in v0.12.13

func (c Core) App() App

func (Core) Cinema

func (c Core) Cinema() beam.Cinema

func (Core) Door

func (c Core) Door() Door

func (Core) Instance

func (c Core) Instance() Instance

type Door

type Door interface {
	Instance() Instance
	Cinema() beam.Cinema
	ID() uint64
	RegisterHook(onTrigger func(ctx context.Context, w http.ResponseWriter, r *http.Request) bool, race Race) (Hook, bool)
	Reload(ctx context.Context) <-chan error
	RootCore() Core
	UserCall(ctx context.Context, action actions.Action, onResult func(json.RawMessage, error), onCancel func(), params actions.CallParams)
	CleanFrame() shredder.SimpleFrame
	ReadyFrame() shredder.SimpleFrame
}

type Hook

type Hook struct {
	HookID uint64
	Cancel context.CancelFunc
}

type Instance

type Instance interface {
	TabState(TabStateDeriver)
	Session() Session
	Logger() *slog.Logger
	Store() ctex.Store
	UserCall(ctx context.Context, action actions.Action, onResult func(json.RawMessage, error), onCancel func(), params actions.CallParams)
	UserCallCheck(check func() bool, action actions.Action, onResult func(json.RawMessage, error), onCancel func(), params actions.CallParams)
	CSPCollector() common.CSPCollector
	ModuleRegistry() ModuleRegistry
	ID() string
	LastSeen() time.Time
	RootID() uint64
	NewID() uint64
	Runtime() shredder.Runtime
	SetStatus(int)
	Location() beam.Source[path.Location]
	Kill()
	TitleMeta() TitleMeta
}

type ModuleRegistry

type ModuleRegistry interface {
	Add(specifier string, path string)
}

type Race added in v0.16.0

type Race int
const (
	RaceSerial Race = iota
	RaceParallel
	RaceStrict
)

type Session added in v0.12.1

type Session interface {
	Logger() *slog.Logger
	App() App
	ID() string
	Expire(time.Duration)
	LastSeen() time.Time
	Context() context.Context
	Store() ctex.Store
	Kill()
}

type TabStateDeriver added in v0.15.5

type TabStateDeriver interface {
	Derive()
}

type TitleMeta added in v0.12.1

type TitleMeta interface {
	gox.Comp
	UpdateTitle(value string, attrs gox.Attrs) context.CancelFunc
	UpdateMeta(prop bool, name string, attrs gox.Attrs) context.CancelFunc
}

Jump to

Keyboard shortcuts

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