aliyun / fc-go-sdk Goto Github PK
View Code? Open in Web Editor NEWThe Go SDK of Alibaba Cloud FunctionCompute
License: MIT License
The Go SDK of Alibaba Cloud FunctionCompute
License: MIT License
I invoked CreateService
method to create an fc service and got the following error:
&url.Error{Op:"Post", URL:"http://cn-beijing.fc.aliyuncs.com/2016-08-15/services", Err:(*net.OpError)(0xc42038c8c0)}
你好,开发者,麻烦加上
1、go get github.com/aliyun/fc-go-sdk
2、import "github.com/aliyun/fc-go-sdk"
买了阿里的产品,希望有一个完善的SDK,包括文档。
Sometime we need call fc http service with signature verification, but we do not want to implement a method to signature. I saw client.go
's sendRequest was implemented, but it's private.So can you help us to make the sendRequest
method under the client.go
be public? Thanks.
我使用sdk里的GetAuthStr
方法调用http触发器。。。resource 参数,总是报错403 。。。后来看了python版的sdk发现。。。。。。。。。。结尾后要跟一个换行符( \n ) 才行。。。
(黑人问号)
https://help.aliyun.com/document_detail/90722.html
Http Trigger now support for custom domain.
We should port changes from aliyun/fc-java-sdk@18473fb to the golang sdk
sdk上传的zip包在网页控制台显示为zip,未被解压,测试报错。同样的zip包在网页控制台上传显示为py文件,并能正确运行。
When we go get
this package under Go 1.11 go mod
, we will get go: github.com/go-resty/[email protected]: parsing go.mod: unexpected module path "gopkg.in/resty.v1"
error.
This issue can be solved by changing import path from github.com/go-resty/resty
to gopkg.in/resty.v1
.
Ref: https://github.com/ory/hydra/pull/1064/files , ory/hydra#1063
因为我们使用的go版本是1.15 但是master分支已经升级到go 1.16了,其中部分代码使用了go1.16才有的io包,导致我们引用master分支的时候编译报错。但是在引用 tag v1.1.0 和tag v1.0.0的时候都报错:go: github.com/aliyun/[email protected]: reading github.com/aliyun/fc-go-sdk/go.mod at revision v1.1.0: unknown revision v1.1.0
能否将client.go: 1163行的io.ReadAll(resp.Body)改成ioutil.ReadAll(resp.Body), 这个文件里同时在使用io.ReadAll(resp.Body)和ioutil.ReadAll(resp.Body),而io.ReadAll(resp.Body)只在go1.16才支持,对老项目很不友好。
请问在触发函数时产生 Process exited unexpectedly before completing request 的原因
InvokeFunction
invokeInput := fc.NewInvokeFunctionInput("xxxx", "xxxx")
invokeOutput, err := client.InvokeFunction(invokeInput)
if err != nil {
fmt.Fprintln(os.Stderr, err)
} else {
fmt.Println(string(invokeOutput.Payload))
}
return
{"errorMessage":"Process exited unexpectedly before completing request (duration: 9ms, maxMemoryUsage: 49.82MB)"}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.