there
# build stage | |
FROM golang:alpine AS build-env | |
ADD . /src | |
RUN cd /src && go build -o goapp | |
# final stage | |
FROM alpine | |
WORKDIR /app | |
COPY --from=build-env /src/goapp /app/ | |
CMD ./goapp |
package main | |
import ( | |
"io" | |
"log" | |
"net/http" | |
"os" | |
) | |
func hello(w http.ResponseWriter, r *http.Request) { |
# build stage | |
FROM golang:alpine AS build-env | |
RUN apk --no-cache add build-base git bzr mercurial gcc | |
ADD . /src | |
RUN cd /src && go build -o goapp | |
# final stage | |
FROM alpine | |
WORKDIR /app | |
COPY --from=build-env /src/goapp /app/ |
FROM golang:alpine | |
WORKDIR /app | |
ADD . /app | |
RUN cd /app && go build -o goapp | |
ENTRYPOINT ./goapp |
package main | |
import "fmt" | |
func main() { | |
fmt.Println("Hello world!") | |
} |
package main | |
import ( | |
"context" | |
"github.com/iron-io/functions/api/server" | |
) | |
func main() { | |
ctx := context.Background() |
Thank you for your interest in the open source project(s) managed by Iron.io, Inc. (“Iron.io”). In order to clarify the intellectual property license granted with Contributions from any person or entity, Iron.io must have a Contributor License Agreement (“CLA”) on file that has been signed by each contributor, indicating agreement to the license terms below. This license is for your protection as a contributor as well as the protection of Iron.io and its other contributors and users; it does not change your rights to use your own Contributions for any other purpose.
By clicking “Accept” on this page You accept and agree to these terms and conditions for Your present and future Contributions submitted to Iron.io. In return, Iron.io shall consider Your Contributions for addition to the official Iron.io open source project(s) for which they were submitted. Except for the license granted herein to Iron.io and recipients of software distributed by Iron.io, You re
package main | |
import ( | |
"fmt" | |
"log" | |
"net/http" | |
"github.com/gorilla/mux" | |
) |
require 'iron_mq' | |
ironmq = IronMQ::Client.new | |
q = ironmq.queue("my_queue") | |
while true | |
msg = q.get | |
if msg.nil? | |
sleep 5 | |
next | |
end |