驱动调试

而该文件中,函数计算应用定义的handler函数不会被调用,因此驱动代码须放在handler函数外,保证加载 index.py 文件时能被直接执行。更多信息,请参见 Python版本SDK。基于Node.js SDK开发的驱动 驱动包文件中须包含 index.js,并且在该...

旧版本物模型开发文档

create=thing_create,/*thing created handler*/.thing_enable=thing_enable,/*thing enabled handler*/.thing_disable=thing_disable,/*thing disabled handler*/.thing_call_service=thing_call_service,/*self-defined service handler*...

使用示例

示例代码:int main(int argc,char*argv[]){./*配置数据到达时,SDK应调用的用户回调函数*/aiot_http_setopt(http_handle,AIOT_HTTPOPT_RECV_HANDLER,demo_http_recv_handler);配置内部状态变化时,SDK应调用的用户回调函数*/aiot_...

环境说明

本文介绍在 函数计算 中使用Java框架编写函数的运行环境信息。...相关文档 请求处理程序 事件请求处理程序(Event Handler)HTTP请求处理程序(HTTP Handler)上下文 编译部署代码包 日志 错误处理 函数实例生命周期回调方法

函数实例生命周期回调

nil } func preStop(ctx context.Context){ log.Print("this is preStop handler")fctx,_:=fccontext.FromContext(ctx)fctx.GetLogger().Infof("context:%v",fctx)} func preFreeze(ctx context.Context){ log.Print("this is preFreeze ...

日志

import logging def handler(event,context):logger=logging.getLogger()logger.info('hello world')return 'done' 执行以上代码,输出的日志内容如下所示。2017-07-05T05:13:35.920Z a72df088-f738-cee3-e0fe-323ad*e5[INFO]hello world ...

HTTPS接入使用示例

示例代码:int main(int argc,char*argv[]){./*配置数据到达时,SDK应调用的用户回调函数*/aiot_http_setopt(http_handle,AIOT_HTTPOPT_RECV_HANDLER,demo_http_recv_handler);配置内部状态变化时,SDK应调用的用户回调函数*/aiot_...

使用示例

相关参数:配置项 示例值 说明 AIOT_COAPOPT_RECV_HANDLER demo_coap_recv_handler 接收消息回调函数。AIOT_COAPOPT_EVENT_HANDLER demo_coap_event_handler 内部事件回调函数。定义状态监控回调函数。在Token变化时,触发回调函数,设置...

OGG for Bigdata(Kafka)

gg.handlerlist=kafkahandler gg.handler.kafkahandler.type=kafka gg.handler.kafkahandler.KafkaProducerConfigFile=custom_kafka_producer.properties#写入的kafka topic gg.handler.kafkahandler.TopicName=kafka_topic_name gg....

Serverless Devs工具使用FAQ

region:${env('REGION')} functionName:"start-nodejs-im1g"description:'hello world by serverless devs' runtime:"nodejs14"code:./code handler:index.handler memorySize:128 timeout:30 ``` 如何本地调试函数?如果您的Runtime不是...

UpdateFunction-更新函数

index.handler","caPort":9000,"instanceType":"e1","instanceSoftConcurrency":5,"instanceLifecycleConfig":{"preFreeze":{"handler":"index.preStop","timeout":10 },"preStop":{"handler":"index.preStop","timeout":10 } },...

步进器(Stepper)

触发此回调(e:number,dataSet:Record,any>)=>void 样式类 类名 说明 amd-stepper 整体样式 amd-stepper-disabled 禁用状态下的整体样式 amd-stepper-handler+-图标区域样式 amd-stepper-handler-up+区域样式 amd-stepper-handler-up-区域...

ALIYUN:OOS:Parameter

''-/ecs-test-handler/run_commands/test-SampleWebAppAutoScalingGroup-Ref:ALIYUN:StackId Outputs:Value:Description:The Value of the parameter.Value:Fn:GetAtt:Parameter-Value Name:Description:The Name of the parameter.Value:...

函数实例生命周期回调

nil } func preStop(ctx context.Context){ log.Print("this is preStop handler")fctx,_:=fccontext.FromContext(ctx)fctx.GetLogger().Infof("context:%v",fctx)} func initialize(ctx context.Context){ log.Print("this is ...

基于函数计算和FFmpeg处理音视频

encoder":"AVC Coding","handler_name":"\u001fMainconcept Video Media Handler","language":"eng"},"time_base":"1/25000","width":1920 },{"avg_frame_rate":"0/0","bit_rate":"317375","bits_per_sample":0,"channel_layout":"stereo...

基础术语

单个简单任务对应一个 handler,支持任务分步。集群任务 Cluster task 支持在单个执行步骤中把数据拆分成多个数据分片(data chunk),把一个任务的数据分散到不同的机器上运行。适用于数据量很大的业务场景。调度过程分为拆分阶段和执行...

日志

import logging def handler(event,context):logger=logging.getLogger()logger.info('hello world')return 'done' 执行以上代码,输出的日志内容如下所示。2017-07-05T05:13:35.920Z a72df088-f738-cee3-e0fe-323ad*e5[INFO]hello world ...

异常处理

其语法是 BEGIN 块的常规语法的扩展:[DECLARE declarations]BEGIN statements EXCEPTION WHEN condition[OR condition].THEN handler_statements[WHEN condition[OR condition].THEN handler_statements].END;如果未发生错误,这种形式的...

Ark 事件机制

Register an event handler*@param eventHandler*/void register(EventHandler eventHandler);un-register an event handler*@param eventHandler*/void unRegister(EventHandler eventHandler);un-register event handler whose ...

API错误码(ODPS-04CCCCX)

ODPS-0420081:Method not allowed Worker-Reqeust handler 1 方法不支持,API返回405错误。修改为支持的方法。ODPS-0420095:Access Denied Worker-Request handler 5 用户无操作权限,API返回403错误。根据提示信息为用户授予相应操作的...

CubeEngineConfig

本文介绍了蚂蚁动态卡片引擎初始化配置类的方法。属性 bundlePath/存储模板的本地资源包的路径@...imageHandler/图片 handler。如果为空,则内部默认实现,建议自定义 handler。property(nonatomic,strong)id<CKImageHandler>imageHandler;

函数类型选型

exports.handler=function(event,context,callback){ callback(null,'hello world');} 入参说明 函数入参 解释说明 event 您调用函数时传入的事件数据,您可以根据实际情况对其进行转换。context 函数计算 平台定义的函数入参,它的数据...

组件配置

未传递 handler 参数时,true 表示需要升级模型,平台后续会再次调用此方法并传递 handler 参数;false 表示不需要升级。PropGroup 属性组 一组属性配置。定义:interface PropGroup { title:string;type:'group';display:'block'|'...

示例代码说明

相关参数:配置项 示例 说明 AIOT_OTAOPT_MQTT_HANDLER demo_ota_recv_handler 当设备收到来自物联网平台的OTA升级指令,调用该回调函数。步骤三:上报设备当前版本号 设备建立MQTT连接后,调用 aiot_ota_report_version,上报当前设备的...

上下文

sys_logger')fc_sys_logger.error('Failed to parse base64 opentracing baggages:[{}],err:{}'.format(base64_baggages,e))return span_baggages class FunctionMeta:def_init_(self,name,handler,memory,timeout):self.name=name self....

以太网灯接入飞燕示例

设备连接到云端后的处理 在示例代码中,当设备通过认证并连接到云端后会调用回调函数user_connected_event_handler,该函数的内容如下:其中user_post_property()用于上报设备的各个属性的最新状态到云端,厂商在开发产品时需要根据自己的...

配置应用生命周期的钩子和探针

在该钩子对应的Hook Handler完成后不论执行的结果如何,Docker Daemon会发送一个SIGTERN信号给Docker Daemon来删除该容器。更多信息,请参见 Container Lifecycle Hooks TerminationGracePeriod配置 设置Pod优雅终止超时时间。请确保...

GetFunction-获取函数信息

environmentVariables":{"key":"{\"key\":\"value\"}"},"functionId":"aa715851-1c20-4b89-a8fb-*","functionName":"function_name","handler":"index.handler","lastModifiedTime":"2020-04-01T08:15:27Z","memorySize":256,"runtime":...

数据类型

目录 数据类型 描述 alirts_handler_t SDK句柄定义,用于SDK实例管理。alirts_config_t 推流配置。alirts_sei_info_t 用户自定义的SEI信息。alirts_frame_t 发送的音视频帧数据。alirts_push_info_t 推流统计信息。alirts_event_handler_t ...

CreateFunction-创建函数

demo-function","handler":"index.handler","lastModifiedTime":"2016-08-15T17:00:00.000+0000","memorySize":512,"runtime":"python3.9","timeout":10,"initializationTimeout":60,"initializer":"index.handler","caPort":9000,...

请求处理程序(Handler

当您的函数被调用时,函数计算 会运行您提供的Handler方法处理请求。您可以通过 函数计算控制台 配置 请求处理程序,对于Java语言的函数,您的请求处理程序需配置为[包名].[类名]:[方法名]。例如,您的包名为example,类型为HelloFC,方法...

数据类型

rts_event_handler_t 事件回调配置。详情 rts_frame:封装音频帧和视频帧的信息类型。struct rts_frame { void*buf;int size;int is_audio;unsigned long long pts;unsigned long long dts;};数据成员 描述 buf frame数据buffer,视频h264...

返回1个JSON

代码 async function handler(event){ const data={ hello:"EdgeRoutine",};const json=JSON.stringify(data,null,2);return new Response(json,{ headers:{"content-type":"application/json;charset=UTF-8",},});} addEventListener('...

部署代码包

import*as emoji from 'node-emoji' export const handler=async(event,context)=>{ console.log('hello world');return emoji.get(':unicorn:');} CommonJS模块/index.js 'use strict';var emoji=require('node-emoji')exports.handler=...

上下文

function FunctionMeta结构,包含以下字段:name handler memory timeout 当前调用的函数的一些基本信息,例如函数名、函数入口、函数内存和超时时间。service ServiceMeta结构,包含以下字段:name logProject logStore qualifier ...

ListFunctions-获取函数列表信息

{"key":"{\"key\":\"value\"}"},"functionId":"2d28e0e9-9ba5-4eed-8b1a-d3d9cd24*","functionName":"demo-function","handler":"index.handler","lastModifiedTime":"2016-08-15T17:00:00.000+0000","memorySize":512,"runtime":"python3....

环境说明

pdo_sqlite.zip pgsql-demo.zip sqlsrv.zip swoole.so 相关文档 请求处理程序(Handler)事件请求处理程序(Event Handler)HTTP请求处理程序(HTTP Handler)上下文 部署代码包 日志 错误处理 函数实例生命周期回调方法

部署代码包

import*as emoji from 'node-emoji' export const handler=async(event,context)=>{ console.log('hello world');return emoji.get(':unicorn:');} CommonJS模块/index.js 'use strict';var emoji=require('node-emoji')exports.handler=...

环境说明

Go SDK与工具 函数计算 提供以下Go SDK与工具:FC SDK for Go:Go运行时编程模型的具体实现,函数计算 平台依赖该包运行您的请求处理程序(Handler)。fccontext:访问函数执行上下文信息(Context)的辅助库。examples:使用Go运行时的...

返回1个JSON

代码 async function handler(event){ const data={ hello:"EdgeRoutine"} const json=JSON.stringify(data,null,2)return new Response(json,{ headers:{"content-type":"application/json;charset=UTF-8"} })} addEventListener('fetch',...
共有200条 < 1 2 3 4 ... 200 >
跳转至: GO
产品推荐
云服务器 安全管家服务 安全中心
这些文档可能帮助您
机器翻译 智能数据建设与治理 Dataphin 三维空间重建 弹性公网IP 短信服务 人工智能平台 PAI
新人特惠 爆款特惠 最新活动 免费试用