Categorygithub.com/segmentio/emissary
modulepackage
0.2.1
Repository: https://github.com/segmentio/emissary.git
Documentation: pkg.go.dev

# README

Emissary CircleCI

emissary is a data plane for Envoy https://github.com/envoyproxy/data-plane-api/blob/master/XDS_PROTOCOL.md

Emissary Diagram

Resolvers

emissary can currently use Consul or the Docker API as resolvers.

Docker Resolver

The Docker resolver will be looking for a label to identify the destination containers for Envoy. By default the label is emissary.service_name but can be override in the configuration.

Development

dep ensure
make

make will build a single executable emissary and tag a docker image emissary:latest

Run the tests using make:

$ make test
# For more verbosity (`Q=` trick applies to all targets)
$ make test Q=

Examples

The examples directory currently has two examples you can run locally with docker-compose

  • eds_grpc
  • eds_az_aware_grpc
cd eds_grpc
make
docker-compose up
cd eds_az_aware_grpc
make
docker-compose up

Each example starts 2 "server" containers with a trivial http server listening on port 8077. It then starts an envoy instance to serve as the loadbalancer for the upstream server cluster. Additionally we start a consul and registrator containers. Finally we start a client which connects to envoy

The examples share the same containers so if you start and stop different examples you may need to clean your stopped containers

docker rm $(docker ps -qa --no-trunc --filter "status=exited")

# Packages

No description provided by the author
No description provided by the author

# Functions

Create a new EDS service.
Setup the EdsService resolver and poller to use Consul.
Setup the EdsService resolver and poller to use Docker.

# Variables

DockerLookupLabel is used to filter containers.
DockerLookupPort is used to lookup the Ip and Port from the containers metadata.

# Structs

ConsulResolver implements the Resolver interface.
DockerClient is meant to be used in DockerResolver.
DockerResolver implements the Resolver interface.
EdsResult is the output of the EDS sources.
EdsService implements the Envoy xDS EndpointDiscovery service.
Endpoints represents a service endpoint to which Envoy will send traffic to.

# Interfaces

Resolver to lookup endpoints for a specific service.

# Type aliases

EdsOpt configures an EdsService.