core

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Core

type Core = *core

func NewCore

func NewCore(inst Instance, door Door) Core

func (Core) Adapters

func (c Core) Adapters() path.Adapters

func (Core) CSPCollector

func (c Core) CSPCollector() *common.CSPCollector

func (Core) Call added in v0.10.0

func (c Core) Call(ctx context.Context, check func() bool, action action.Action, onResult func(json.RawMessage, error), onCancel func(), params action.CallParams)

func (Core) Cinema

func (c Core) Cinema() beam.Cinema

func (Core) Conf

func (c Core) Conf() *common.SystemConf

func (Core) Door

func (c Core) Door() Door

func (Core) DoorID

func (c Core) DoorID() uint64

func (Core) Instance

func (c Core) Instance() Instance

func (Core) InstanceEnd

func (c Core) InstanceEnd()

func (Core) InstanceID

func (c Core) InstanceID() string

func (Core) ModuleRegistry

func (c Core) ModuleRegistry() ModuleRegistry

func (Core) NewID

func (c Core) NewID() uint64
func (c Core) NewLink(m any) (Link, error)

func (Core) PathMaker

func (c Core) PathMaker() path.PathMaker

func (Core) RegisterHook

func (c Core) RegisterHook(onTrigger func(ctx context.Context, w http.ResponseWriter, r *http.Request) bool, onCancel func(ctx context.Context)) (Hook, bool)

func (Core) Reload added in v0.9.0

func (c Core) Reload(ctx context.Context)

func (Core) ResourceRegistry

func (c Core) ResourceRegistry() *resources.Registry

func (Core) RootCore

func (c Core) RootCore() Core

func (Core) RootID

func (c Core) RootID() uint64

func (Core) Runtime

func (c Core) Runtime() shredder.Runtime

func (Core) SessionEnd

func (c Core) SessionEnd()

func (Core) SessionExpire

func (c Core) SessionExpire(d time.Duration)

func (Core) SessionID

func (c Core) SessionID() string

func (Core) SetStatus

func (c Core) SetStatus(status int)

func (Core) UpdateMeta

func (c Core) UpdateMeta(name string, property bool, attrs gox.Attrs)

func (Core) UpdateTitle

func (c Core) UpdateTitle(content string, attrs gox.Attrs)

func (Core) XReload added in v0.9.0

func (c Core) XReload(ctx context.Context) <-chan error

type Door

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

type Hook

type Hook struct {
	HookID uint64
	Cancel context.CancelFunc
}

type Instance

type Instance interface {
	CSPCollector() *common.CSPCollector
	ModuleRegistry() ModuleRegistry
	ResourceRegistry() *resources.Registry
	ID() string
	RootID() uint64
	Conf() *common.SystemConf
	NewID() uint64
	NewLink(any) (Link, error)
	Runtime() shredder.Runtime
	SetStatus(int)
	SessionExpire(time.Duration)
	SessionEnd()
	InstanceEnd()
	SessionID() string
	Adapters() path.Adapters
	PathMaker() path.PathMaker
	UpdateTitle(content string, attrs gox.Attrs)
	UpdateMeta(name string, property bool, attrs gox.Attrs)
	UserCall(ctx context.Context, check func() bool, action action.Action, onResult func(json.RawMessage, error), onCancel func(), params action.CallParams)
}
type Link struct {
	Location path.Location
	On       func(context.Context)
}

type ModuleRegistry

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

Jump to

Keyboard shortcuts

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