From c9f10f75c43437f807de2ec0dabaecfb2d1127e9 Mon Sep 17 00:00:00 2001 From: Diptanu Choudhury Date: Mon, 16 Nov 2015 22:43:22 -0500 Subject: [PATCH] Added the example for service block --- command/init.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/command/init.go b/command/init.go index c911c95cf..668b33b26 100644 --- a/command/init.go +++ b/command/init.go @@ -128,6 +128,19 @@ job "example" { } } + service { + # name = redis + tags = ["global", "cache"] + port = "db" + check { + id = "id-alive-check" + name = "alive" + type = "tcp" + interval = "10s" + timeout = "2s" + } + } + # We must specify the resources required for # this task to ensure it runs on a machine with # enough capacity.