Documentation
¶
Overview ¶
/* * Copyright (C) 2019 Yunify, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this work except in compliance with the License. * You may obtain a copy of the License in the LICENSE file, or at: * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */
Index ¶
- Variables
- type ActionTask
- func (this *ActionTask) Close() error
- func (this *ActionTask) Context(ctx context.Context) types.ActionContent
- func (this *ActionTask) Invoke(ctx types.ActionContent, message metapb.Message) error
- func (this *ActionTask) SetErrorCallback(fn func(*ActionTask, error))
- func (this *ActionTask) Setup(ctx context.Context) error
- type ErrorMessage
- type Factor
- type FailureMessage
- type Option
- type Task
- func (this *Task) Check() error
- func (this *Task) Close(ctx context.Context) error
- func (this *Task) ID() string
- func (this *Task) Invoke(ctx context.Context, vCtx ruleql.Context, msg stream.PublishMessage) error
- func (this *Task) RefreshTime() int64
- func (this *Task) String() string
- func (this *Task) UserID() string
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrEventTypeUndefined = errors.New("event type undefined") ErrActionMetaLoadFail = errors.New("action Load meta fail") ErrActionLoadFail = errors.New("action load fail") ErrActionUnloadFail = errors.New("action unload fail") ErrActionSetupError = errors.New("action setup fail") ErrActionInvokeError = errors.New("action invoke fail") ErrActionCloseError = errors.New("action close fail") ErrActionOnError = errors.New("action has error") )
Functions ¶
This section is empty.
Types ¶
type ActionTask ¶
type ActionTask struct { ActionData *metapb.Action Action types.Action EntityID string // contains filtered or unexported fields }
func (*ActionTask) Close ¶
func (this *ActionTask) Close() error
func (*ActionTask) Context ¶
func (this *ActionTask) Context(ctx context.Context) types.ActionContent
func (*ActionTask) Invoke ¶
func (this *ActionTask) Invoke(ctx types.ActionContent, message metapb.Message) error
func (*ActionTask) SetErrorCallback ¶
func (this *ActionTask) SetErrorCallback(fn func(*ActionTask, error))
type ErrorMessage ¶
type ErrorMessage struct { RuleName string `json:"ruleName,omitempty"` Topic string `json:"topic,omitempty"` DeviceId string `json:"deviceId,omitempty"` MessageId string `json:"messageId,omitempty"` Base64OriginalPayload []byte `json:"base64OriginalPayload,omitempty"` Failures []FailureMessage `json:"failures,omitempty"` }
type FailureMessage ¶
type Option ¶
type Option struct { Tracer opentracing.Tracer Logger log.Factory ResourceManager types.ResourceManager }
Option
Click to show internal directories.
Click to hide internal directories.