George Barnett 5287f05a90 Add deployment targets to the package manifest (#2082) 1 year ago
..
Sources 5287f05a90 Add deployment targets to the package manifest (#2082) 1 year ago
.gitignore cf29048827 Make examples standalone packages (#2067) 1 year ago
Package.swift 82b3a7556b Update examples (#2078) 1 year ago
README.md cf29048827 Make examples standalone packages (#2067) 1 year ago

README.md

Route Guide

This example demonstrates all four RPC types using a 'Route Guide' service and client.

Overview

A "route-guide" command line tool that uses generated stubs for a 'Route Guide' service allows you to start a server and to make requests against it for each of the four RPC types.

The tool uses the SwiftNIO HTTP/2 transport.

This example has an accompanying tutorial hosted on the Swift Package Index.

Usage

Build and run the server using the CLI:

$ swift run route-guide serve
server listening on [ipv4]127.0.0.1:31415

Use the CLI to interrogate the different RPCs you can call:

$ swift run route-guide --help
USAGE: route-guide <subcommand>

OPTIONS:
  -h, --help              Show help information.

SUBCOMMANDS:
  serve                   Starts a route-guide server.
  get-feature             Gets a feature at a given location.
  list-features           List all features within a bounding rectangle.
  record-route            Records a route by visiting N randomly selected points and prints a summary of it.
  route-chat              Visits a few points and records a note at each, and prints all notes previously recorded at each point.

  See 'route-guide help <subcommand>' for detailed help.