tick

command
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2016 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:

  • Go 1.6+
  • netman-release
    • cloned under ~/workspace/netman-release
  • Ensure GOPATH is set to netman-release:
    • export GOPATH=~/workspace/netman-release
  • jq
  • Deploying to bosh-lite
    • Cloud Foundry org and space created and targetted

Setup

cd ~/workspace/netman-release/src/github.com/amalgam8/amalgam8
GOOS=linux GOARCH=amd64 go build -o a8registry cmd/registry/main.go
cf push registry -c './a8registry' -b binary_buildpack -d bosh-lite.com

Example

Push 3 instances of tick app

cd ~/workspace/netman-release/src/example-apps/tick
cf push tick -i 3 -m 32M --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