Documentation
¶
Index ¶
- type AnyInstance
- type App
- type Instance
- func (i *Instance[M]) Adapters() path.Adapters
- func (c *Instance[M]) CSPCollector() *common.CSPCollector
- func (c *Instance[M]) Call(call action.Call)
- func (c *Instance[M]) CallCheck(check func() bool, action action.Action, onResult func(json.RawMessage, error), ...)
- func (c *Instance[M]) CallCtx(ctx context.Context, action action.Action, ...) context.CancelFunc
- func (inst *Instance[M]) Conf() *common.SystemConf
- func (inst *Instance[M]) Connect(w http.ResponseWriter, r *http.Request)
- func (inst *Instance[M]) ID() string
- func (i *Instance[M]) InstanceEnd()
- func (d *Instance[M]) License() string
- func (c *Instance[M]) ModuleRegistry() core.ModuleRegistry
- func (c *Instance[M]) NewID() uint64
- func (c *Instance[M]) NewLink(m any) (core.Link, error)
- func (i *Instance[M]) PathMaker() path.PathMaker
- func (c *Instance[M]) ResourceRegistry() *resources.Registry
- func (inst *Instance[M]) RestorePath(l path.Location) bool
- func (c *Instance[M]) RootID() uint64
- func (inst *Instance[M]) Runtime() shredder.Runtime
- func (inst *Instance[M]) Serve(w http.ResponseWriter, r *http.Request) error
- func (i *Instance[M]) SessionEnd()
- func (i *Instance[M]) SessionExpire(d time.Duration)
- func (i *Instance[M]) SessionID() string
- func (d *Instance[M]) SetStatus(status int)
- func (inst *Instance[M]) Shutdown()
- func (inst *Instance[M]) SyncError(err error)
- func (inst *Instance[M]) Touch()
- func (inst *Instance[M]) TriggerHook(doorID uint64, hookID uint64, w http.ResponseWriter, r *http.Request, ...) (ok bool)
- func (inst *Instance[M]) UpdateMeta(name string, property bool, attrs gox.Attrs)
- func (inst *Instance[M]) UpdateTitle(content string, attrs gox.Attrs)
- type Options
- type ScriptOptions
- type Session
- func (sess *Session) AddInstance(inst AnyInstance) bool
- func (sess *Session) GetInstance(id string) (AnyInstance, bool)
- func (sess *Session) ID() string
- func (sess *Session) InstanceCount() int
- func (sess *Session) Kill()
- func (sess *Session) Renew(w http.ResponseWriter) bool
- func (sess *Session) SetExpiration(d time.Duration)
- func (sess *Session) Store() ctex.Store
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(path.Location) bool
TriggerHook(uint64, uint64, http.ResponseWriter, *http.Request, uint64) bool
Connect(w http.ResponseWriter, r *http.Request)
SetStatus(int)
InstanceEnd()
// contains filtered or unexported methods
}
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]) 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]) InstanceEnd ¶
func (i *Instance[M]) InstanceEnd()
func (*Instance[M]) ModuleRegistry ¶
func (c *Instance[M]) ModuleRegistry() core.ModuleRegistry
func (*Instance[M]) ResourceRegistry ¶
func (*Instance[M]) SessionEnd ¶
func (i *Instance[M]) SessionEnd()
func (*Instance[M]) SessionExpire ¶
func (*Instance[M]) TriggerHook ¶
func (*Instance[M]) UpdateMeta ¶
type ScriptOptions ¶
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) InstanceCount ¶
func (*Session) SetExpiration ¶
Click to show internal directories.
Click to hide internal directories.