Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataPushReq ¶
type DataPushReqs ¶
type DataPushReqs []*DataPushReq
func (DataPushReqs) SetDefault ¶
func (reqs DataPushReqs) SetDefault()
type DataPushRsp ¶
type DataPushRsps ¶
type DataPushRsps []*DataPushRsp
func BatchCreate ¶
func BatchCreate(ctx context.Context, reqs DataPushReqs) (DataPushRsps, error)
type EventCleanupScheduler ¶
type EventCleanupScheduler struct {
// contains filtered or unexported fields
}
func NewDefaultEventCleanupScheduler ¶
func NewDefaultEventCleanupScheduler() *EventCleanupScheduler
func NewEventCleanupScheduler ¶
func NewEventCleanupScheduler(d time.Duration, keep time.Duration) *EventCleanupScheduler
func (*EventCleanupScheduler) Run ¶
func (s *EventCleanupScheduler) Run(ctx context.Context)
type EventHandleScheduler ¶
type EventHandleScheduler struct {
// contains filtered or unexported fields
}
func NewDefaultEventHandleScheduler ¶
func NewDefaultEventHandleScheduler(prj types.SFID) *EventHandleScheduler
func NewEventHandleScheduler ¶
func (*EventHandleScheduler) Run ¶
func (s *EventHandleScheduler) Run(ctx context.Context)
type EventReq ¶ added in v1.1.0
type EventReq struct { // From transport source From enums.EventSource `in:"query" name:"from,omitempty"` // Channel message channel named (intact project name) Channel string `in:"path" name:"channel"` // EventType used for filter strategies created in w3b before EventType string `in:"query" name:"eventType,omitempty"` // EventID unique id for tracing event under channel EventID string `in:"query" name:"eventID,omitempty"` // Timestamp event time when publisher do send Timestamp int64 `in:"query" name:"timestamp,omitempty"` // Payload event payload (binary only) Payload bytes.Buffer `in:"body" mime:"stream"` }
func (*EventReq) IsDataPush ¶ added in v1.4.3
func (*EventReq) SetDefault ¶ added in v1.1.0
func (r *EventReq) SetDefault()
type EventRsp ¶ added in v1.1.0
type EventRsp struct { // Channel intact project name Channel string `json:"channel"` // PublisherID publisher(device) unique id in w3b node PublisherID types.SFID `json:"publisherID"` // PublisherKey publisher(device) mn unique id of this device PublisherKey string `json:"publisherKey"` // EventID same as EventReq.EventID EventID string `json:"eventID"` // Timestamp event respond time when event handled done. Timestamp int64 `json:"timestamp"` // Results result for each wasm invoke, which hits strategies. Results []*Result `json:"results"` // Error error message from w3b node (api level), different from Result.Error Error string `json:"error,omitempty"` }
func HandleEvent ¶ added in v1.1.0
HandleEvent support other module call TODO the full project info is not in context so query and set here. this impl is for support other module, which is temporary. And it will be deprecated when rpc/http is ready
type Result ¶ added in v1.1.0
type Result struct { // AppletName applet name(unique) under published channel(project) AppletName string `json:"appletName"` // InstanceID the unique wasm vm id InstanceID types.SFID `json:"instanceID"` // Handler invoked wasm entry name Handler string `json:"handler"` // ReturnValue wasm call returned value ReturnValue []byte `json:"returnValue"` // ReturnCode wasm call returned code ReturnCode int `json:"code"` // Error message instance module, presents result for wasm invoking Error string `json:"error,omitempty"` }
Click to show internal directories.
Click to hide internal directories.