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

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

Build:
Build:
LAST BUILD BRANCH: nooptrace
DEFAULT BRANCH: master
Ran 15 Mar 2017 12:00AM UTC
Files 159
Run time 10s
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

14 Mar 2017 11:50PM UTC coverage: 79.937% (+0.4%) from 79.561%
TYPE=test

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%)

35.94 hits per line

Source Files on job 4699.4 (TYPE=test)
  • Tree
  • List 0
  • Changed 12
  • Source Changed 0
  • Coverage Changed 12
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 4699
  • Travis Job 4699.4
  • ef9cb818 on github
  • Prev Job for TYPE=test on dev (#4694.6)
  • Next Job for TYPE=test on dev (#4718.6)
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