greeter

command
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2019 License: MIT Imports: 12 Imported by: 0

README

Greeter Service

This is the Greeter service

Configuration

  • FQDN: greeter-srv
  • Type: srv
  • Alias: greeter

Usage

A Makefile is included for convenience

Build the binary

make build TARGET=greeter TYPE=srv VERSION=v0.1.1

Run the service

make run-greeter
# or
go run srv/greeter/main.go srv/greeter/plugin.go --configDir deploy/bases/greeter-srv/config

Build a docker image

make docker TARGET=greeter TYPE=srv VERSION=v0.1.1
Test
micro --client=grpc call greeter-srv Greeter.Hello  '{"name": "John"}'

# in k8s container
./micro --client=grpc call greeter-srv Greeter.Hello  '{"name": "John"}'

curl --request POST \
--url http://localhost:8080/rpc \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{"service": "greeter-srv", "method": "Greeter.Hello","request": {"name": "sumo"}}'

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
proto

Jump to

Keyboard shortcuts

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