examples/

directory
v0.0.0-...-fa722ee Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2017 License: BSD-3-Clause

README

OVH Functions examples

Go to docs.functions.ovh if you don't have the ovh-functions cli yet.

Environment variables

These examples are using environment variables. See corresponding functions.yml config to know which ones.

Examples

Redis SET/GET

Set and get Redis key/value. code

echo '{"k":"date","v":"'$(date)'"}' | ovh-functions exec redis.set
OK

echo '{"k":"date"}' | ovh-functions exec redis.get
vendredi 21 avril 2017, 01:23:36 (UTC+0200)
Mail

Send an email. code

echo '{"to":"<email>", "subject":"Time", "text":"'$(date)'"}' | \
  ovh-functions exec mail.send
{"accepted":["<email>"],"rejected":[],"response":"250 2.0.0 OK ..."}
Kafka HTTPS

Produce a message in Kafka using the OVH Kafka HTTPS proxy. code

echo '{"message":"'$(date)'"}' | \
  ovh-functions exec kafka.pub
[{"Value":"\"vendredi 21 avril 2017, 01:13:49 (UTC+0200)\""}]

Hipchat

Send an Hipchat notification. code

echo '{"message":"'$(date)'"}' | \
  ovh-functions exec hipchat.notify
{"statusCode":204,"location":"https://api.hipchat.com/v2/room/123456/history/7a254146-...}

Directories

Path Synopsis
go

Jump to

Keyboard shortcuts

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