Documentation
¶
Index ¶
- type AnyInstance
- type App
- type Core
- type Instance
- func (inst *Instance[M]) Connect(w http.ResponseWriter, r *http.Request)
- func (inst *Instance[M]) Id() string
- func (inst *Instance[M]) OnPanic(err error)
- func (inst *Instance[M]) RestorePath(r *http.Request) bool
- func (inst *Instance[M]) Serve(w http.ResponseWriter, r *http.Request) error
- func (inst *Instance[M]) TriggerHook(doorId uint64, hookId uint64, w http.ResponseWriter, r *http.Request, ...) bool
- type Link
- type Options
- type ScriptOptions
- type Session
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 ¶
type Core ¶
type Core interface {
Spawn(func()) bool
Thread() *shredder.Thread
CSPCollector() *common.CSPCollector
ImportRegistry() *resources.Registry
SessionId() string
Conf() *common.SystemConf
Id() string
NewId() uint64
Cinema() *door.Cinema
NewLink(any) (*Link, error)
SessionExpire(d time.Duration)
SessionEnd()
Call(call action.Call)
CallCtx(ctx context.Context, action action.Action, onResult func(json.RawMessage, error), onCancel func(), params action.CallParams) context.CancelFunc
CallCheck(check func() bool, action action.Action, onResult func(json.RawMessage, error), onCancel func(), params action.CallParams)
End()
IsDetached() bool
License() license.License
}
type Instance ¶
type Instance[M any] struct { // contains filtered or unexported fields }
func (*Instance[M]) Connect ¶
func (inst *Instance[M]) Connect(w http.ResponseWriter, r *http.Request)
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) SetExpiration ¶
Click to show internal directories.
Click to hide internal directories.