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

yarpc / yarpc-go / 3506 / 4
85%
master: %

Build:
Build:
LAST BUILD BRANCH: nooptrace
DEFAULT BRANCH: master
Ran 23 Dec 2016 01:33AM UTC
Files 120
Run time 7s
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

23 Dec 2016 01:00AM UTC coverage: 85.646%. First build
TYPE=test

push

travis-ci

abhinav
Add CallOption for call-site options

This adds a `CallOption` type and a bunch of constructors for it in the
`yarpc` package. Call options affect per-call options for a request at the
call site.

Client implementations in encodings will apply call options to a call and use
that to hydrate a `transport.Request`. For example, consider,

```
func Call(
    ctx context.Context,
    reqBody MyRequest,
    opts ...yarpc.CallOption,
) (resBody MyResponse, error) {
    // ...
}
```

Where `MyRequest` and `MyResponse` are encoding-specific representations of
request and response bodies. The implementation will simply do,

```
var call yarpc.Call
yarpc.ApplyCallOptions(&call, opts...)

req := transport.Request{
    // Fill with client-level information
    Caller: ...,
    Service: ...,
    // And the encoded request body
    Body: serialize(reqBody),
}
call.WriteToRequest(ctx, &req) // apply options

// Call the outbound
res, err := outbound.Call(ctx, req)
if err != nil {
    // ..
}

call.ReadFromResponse(ctx, res)
```

5752 of 6716 relevant lines covered (85.65%)

0.91 hits per line

Source Files on job 3506.4 (TYPE=test)
  • Tree
  • List 0
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 3506
  • Travis Job 3506.4
  • 3a46c388 on github
  • Next Job for TYPE=test on rm-meta (#3525.3)
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