openfaas / go-sdk Goto Github PK
View Code? Open in Web Editor NEWAn SDK for use within OpenFaaS functions
License: Other
An SDK for use within OpenFaaS functions
License: Other
add openfaas=1
annotation to create and update namespace operation
Adding a context allows for better cancellation and propagation of cancellations.
func (s *Client) DeleteFunction(functionName, namespace string) error {
req, err := http.NewRequest(http.MethodPost, u.String(), bodyReader)
=>
func (s *Client) DeleteFunction(ctx context.Context, functionName, namespace string) error {
req, err := http.NewRequestWithContext(ctx, http.MethodPost, u.String(), bodyReader)
Openfaas implementations support namespace management. Add the support for same in go-sdk.
Add example for deploying a function to the README
Use the env function from the store?
setting FAAS_DEBUG=1
environment variable let's users debug faas-cli
operations. We want to support the same in go-sdk
. This will help users to debug issues in their codebase.
Change from returning error to HttpError to allow the end-user to read the Status code from the server, along with the error message we already return.
type HttpError struct {
Err error
Status int
}
func (e *HttpError) Error() string {
return e.Err.Error()
}
Examples should be added for all the supported functionalities by go-sdk
, so users can use it to build capabilities at their end.
Implement a User-Agent to various API calls and/or invoke.
This is required to be a good citizen on the Internet, and for understanding consumers of endpoints from server logs.
Look at the code block. Instead of using provide http client in parameter, default one is being set
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.