• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

yarpc / yarpc-go / 4699
81%
master: %

Build:
Build:
LAST BUILD BRANCH: nooptrace
DEFAULT BRANCH: master
Ran 15 Mar 2017 12:00AM UTC
Jobs 2
Files 159
Run time 18min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
4699

push

travis-ci

web-flow
config: Pluggable configuration system (#747)

This implements a generic configuration system for YARPC that allows
transports to register themselves and the configuration parameters they
need against a `Configurator` object.

The `Configurator` is capable of reading arbitrary
`map[interface{}]interface{}` objects into a `yarpc.Config`. The map is
decoded into shapes defined by transport authors in their
`Build{Transport, Inbound, UnaryOutbound, OnewayOutbound}` functions
which are responsible for building the `transport.{Transport, Inbound,
UnaryOutbound, OnewayOutbound}` objects based on the configuration.

The following top-level attributes are expected in the map:

-   `name`: Name of the service
-   `transports`: Mapping of transport name to `transport.Transport`
    configuration
-   `inbounds`: Mapping of inbound name to `transport.Inbound` configuration
-   `outbounds`: Mapping of outbound name to `transport.Outbound` configuration

Inbound configurations can list `type: foo` to override which transport is
used and `disabled: true` to disable that inbound completely.

    inbounds:
      tchannel:
        disabled: true
        # ..
      http-1:
        type: http
        # ..
      http-2:
        type: http
        # ..

Outbound configurations can specify `service: foo` to change the name of the
destined service while keeping the client config key the same.

    outbounds:
      myservice:
        http: # ..
      myservice-staging:
        service: myservice
        http: # ..

Finally, outbound configurations may be specified in one of two forms: With
explicit configuration per RPC-type or implicit configuration to pick up any
RPC type supported by the transport. The implicit form was shown above. The
explicit form is,

    outbounds:
      myservice:
        unary:
          http: # ...
        oneway:
          redis: # ...

Depends on #746

7315 of 9151 relevant lines covered (79.94%)

71.3 hits per line

Jobs
ID Job ID Ran Files Coverage
4 4699.4 (TYPE=test) 15 Mar 2017 12:00AM UTC 0
79.94
Travis Job 4699.4
6 4699.6 (TYPE=test) 15 Mar 2017 12:18AM UTC 0
79.94
Travis Job 4699.6
Source Files on build 4699
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #4699
  • ef9cb818 on github
  • Prev Build on dev (#4694)
  • Next Build on dev (#4718)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc