simple-client-server

command module
v0.0.0-...-f336dad Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2019 License: GPL-3.0 Imports: 1 Imported by: 0

README

Build Status Go Report Card

simple-client-server

simple client and server

Run with Docker

You can use the Pre-built image, just remember to generate some certs first. Either specify your own or use make gencerts.

$ docker run -d --rm --name echo_server -v $PWD/bin/tls:/tls jharshman/simple-client-server:latest server --loglvl debug --cert /tls/cert.pem --key /tls/key.pem

$ docker run --rm -v $PWD/bin/tls:/tls --link=echo_server:echo.example.int jharshman/simple-client-server:latest client --client-cert /tls/cert.pem --server echo.example.int --msg "knock knock" 

Build

$ make build

Run the server

$ make run_server

Run the client

$ make run_client

Component Breakdown

Server Usage

➜  simple-client-server git:(master) ./bin/simple-client-server_darwin_amd64 server --help
Run the echo server

Usage:
  simple-client-server server [flags]

Flags:
      --cert string     tls cert (default "cert.pem")
  -h, --help            help for server
      --key string      tls key (default "key.pem")
      --loglvl string   log level (default "info")
      --port string     grpc bind address (default "9000")

Client Usage

➜  simple-client-server git:(master) ✗ ./bin/simple-client-server_darwin_amd64 client --help

Facilitates communication to Echo Server.

Usage:
  simple-client-server client [flags]

Flags:
      --client-cert string   client tls certificate (default "cert.pem")
  -h, --help                 help for client
      --msg string           message to send to echo server
      --server string        address of echo server (default "127.0.0.1")
      --server-port string   port of echo server (default "9000")

Documentation

Overview

Copyright © 2019 Joshua Harshman

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.
pkg

Jump to

Keyboard shortcuts

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