tick

command
v1.8.3 Latest Latest
Warning

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

Go to latest
Published: May 10, 2018 License: Apache-2.0 Imports: 14 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

tick ❤

Simple app that registers itself with an a8registry on a regular interval.

Prerequisites

The following instructions for this example assume the following:

  • This git repo cloned somewhere
  • jq
  • A Cloud Foundry deployed. Below we assume bosh-lite, but you can substitute your CF domain instead.

Example

Starting from this directory....

Push an instance of the service registry

cd ../registry
cf push registry
cd ../tick

Push 3 instances of tick app

cf push tick --no-start
cf set-env tick REGISTRY_BASE_URL "http://registry.bosh-lite.com"
cf start tick

Verify the # of app instances registered in service registry

$ curl -s registry.bosh-lite.com/api/v1/instances | jq '.instances | length'
  3

See details of app instances registered in service registry

$ curl -s registry.bosh-lite.com/api/v1/instances | jq .
{
  "instances": [
    {
      "id": "29bfde7bcd321ee9",
      "service_name": "tick",
      "endpoint": {
        "type": "tcp",
        "value": "10.255.6.9:8080"
      },
      "ttl": 10,
      "status": "UP",
      "last_heartbeat": "2016-09-14T13:30:48.726709455Z"
    },
    {
      "id": "b36fdd8c20018133",
      "service_name": "tick",
      "endpoint": {
        "type": "tcp",
        "value": "10.255.6.10:8080"
      },
      "ttl": 10,
      "status": "UP",
      "last_heartbeat": "2016-09-14T13:30:48.107560504Z"
    },
    {
      "id": "bd1a694d32055f34",
      "service_name": "tick",
      "endpoint": {
        "type": "tcp",
        "value": "10.255.27.13:8080"
      },
      "ttl": 10,
      "status": "UP",
      "last_heartbeat": "2016-09-14T13:30:48.268383996Z"
    }
  ]
}

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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