sonobuoy

command module
v0.0.0-...-25ed7e8 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

README

sonobuoy fa-dot-circle-regular

Simple, multi-protocol echo proxy

A sonobuoy (a portmanteau of sonar and buoy) is a relatively small buoy - typically 13 cm (5 in) diameter and 91 cm (3 ft) long - expendable sonar system that is dropped/ejected from aircraft or ships conducting anti-submarine warfare or underwater acoustic research.

These sonobuoys can be deployed as a means of passing health checks and are a great example of a passthrough health check (to ensure an upstream is healthy).

Usage

Use sonobuoy in order to pass health checks of different protocol types, including TCP, HTTP, and gRPC.

Usage:
  sonobuoy [flags]

Flags:
  -p, --port string         Port (default ":2869")
  -P, --protocol protocol   Protocol: tcp | http | grpc (default tcp)
TCP (default)

The TCP sonobuoy will gracefully close the TCP connection whenever one is successfully established and a payload sent.

Test using netcat:

$ nc -v localhost 2869
Connection to localhost port 2869 [tcp/icslap] succeeded!
HTTP

The HTTP sonobuoy sends an empty HTTP response with the 200 status.

Test using curl:

$ curl -v localhost:2869
*   Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to localhost (127.0.0.1) port 2869 (#0)
> GET / HTTP/1.1
> Host: localhost:2869
> User-Agent: curl/7.64.1
> Accept: */*
>
< HTTP/1.1 200 OK
< Date: Fri, 04 Feb 2022 13:51:59 GMT
< Content-Length: 0
<
* Connection #0 to host localhost left intact
* Closing connection 0
gRPC

The gRPC sonobuoy uses a signal protobuf that accepts and returns an empty set.

Test using gRPCurl:

$ grpcurl -plaintext -proto proto/signal.proto localhost:2869 signal.v1alpha.Echo/Signal
{

}

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

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