hello-flow

command
v0.0.0-...-6943f8c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 3, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

README

Writing Flow Applications in Go

Prerequisites

# ensure you have the latest images
$ docker pull fnproject/fnserver:latest
$ docker pull fnproject/flow:latest

# ensure you have the latest fn CLI
$ curl -LSs https://raw.githubusercontent.com/fnproject/cli/master/install | sh

Start Services

# start the fn server
fn start -d

sleep 5

# start the Flow Service and point it at the functions server API URL
FNSERVER_IP=$(docker inspect --type container -f '{{.NetworkSettings.IPAddress}}' fnserver)

docker run --rm -d \
     -p 8081:8081 \
     -e API_URL="http://$FNSERVER_IP:8080/invoke" \
     -e no_proxy=$FNSERVER_IP \
     --name flowserver \
     fnproject/flow:latest

Deploy Example

Install golang dep if you haven't already.

Deploy the example application to the functions server:

make dep-up deploy-local

Invoke Example

You are now ready to invoke the example:

make invoke

or

fn invoke go-flow go-flow

You should be able to see the following output: Flow succeeded with value foo

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL