instance

package
v0.8.0-rc0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2026 License: AGPL-3.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnyInstance

type AnyInstance interface {
	ID() string
	Serve(http.ResponseWriter, *http.Request) error
	RestorePath(*http.Request) bool
	TriggerHook(uint64, uint64, http.ResponseWriter, *http.Request, uint64) bool
	Connect(w http.ResponseWriter, r *http.Request)
	// contains filtered or unexported methods
}

func NewInstance

func NewInstance[M any](sess *Session, app App[M], adapter *path.Adapter[M], m *M, opt Options) (AnyInstance, bool)

type App

type App[M any] interface {
	Main(path beam.Source[M]) gox.Elem
}

type Instance

type Instance[M any] struct {
	// contains filtered or unexported fields
}

func (*Instance[M]) CSPCollector

func (c *Instance[M]) CSPCollector() *common.CSPCollector

func (*Instance[M]) Call

func (c *Instance[M]) Call(call action.Call)

func (*Instance[M]) CallCheck

func (c *Instance[M]) CallCheck(check func() bool, action action.Action, onResult func(json.RawMessage, error), onCancel func(), params action.CallParams)

func (*Instance[M]) CallCtx

func (c *Instance[M]) CallCtx(ctx context.Context, action action.Action, onResult func(json.RawMessage, error), onCancel func(), params action.CallParams) context.CancelFunc

func (*Instance[M]) Conf

func (inst *Instance[M]) Conf() *common.SystemConf

func (*Instance[M]) Connect

func (inst *Instance[M]) Connect(w http.ResponseWriter, r *http.Request)

func (*Instance[M]) Detached

func (c *Instance[M]) Detached() bool

func (*Instance[M]) ID

func (inst *Instance[M]) ID() string

func (*Instance[M]) InstanceEnd

func (i *Instance[M]) InstanceEnd()

func (*Instance[M]) License

func (d *Instance[M]) License() license.License

func (*Instance[M]) ModuleRegistry

func (c *Instance[M]) ModuleRegistry() core.ModuleRegistry

func (*Instance[M]) NewID

func (c *Instance[M]) NewID() uint64
func (c *Instance[M]) NewLink(m any) (core.Link, error)

func (*Instance[M]) ResourceRegistry

func (c *Instance[M]) ResourceRegistry() *resources.Registry

func (*Instance[M]) RestorePath

func (inst *Instance[M]) RestorePath(r *http.Request) bool

func (*Instance[M]) RootID

func (c *Instance[M]) RootID() uint64

func (*Instance[M]) Runtime

func (inst *Instance[M]) Runtime() shredder.Runtime

func (*Instance[M]) Serve

func (inst *Instance[M]) Serve(w http.ResponseWriter, r *http.Request) error

func (*Instance[M]) SessionEnd

func (i *Instance[M]) SessionEnd()

func (*Instance[M]) SessionExpire

func (i *Instance[M]) SessionExpire(d time.Duration)

func (*Instance[M]) SessionID

func (i *Instance[M]) SessionID() string

func (*Instance[M]) SetStatus

func (d *Instance[M]) SetStatus(status int)

func (*Instance[M]) Shutdown

func (inst *Instance[M]) Shutdown()

func (*Instance[M]) SyncError

func (inst *Instance[M]) SyncError(err error)

func (*Instance[M]) Touch

func (inst *Instance[M]) Touch()

func (*Instance[M]) TriggerHook

func (inst *Instance[M]) TriggerHook(doorID uint64, hookID uint64, w http.ResponseWriter, r *http.Request, track uint64) (ok bool)

type Options

type Options struct {
	Detached bool
	Rerouted bool
}

type ScriptOptions

type ScriptOptions struct {
	Minify bool
	Gzip   bool
}

type Session

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

func NewSession

func NewSession(r router) *Session

func (*Session) AddInstance

func (sess *Session) AddInstance(inst AnyInstance) bool

func (*Session) GetInstance

func (sess *Session) GetInstance(id string) (AnyInstance, bool)

func (*Session) ID

func (sess *Session) ID() string

func (*Session) Kill

func (sess *Session) Kill()

func (*Session) SetExpiration

func (sess *Session) SetExpiration(d time.Duration)

Jump to

Keyboard shortcuts

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