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

yarpc / yarpc-go / 3537
85%
master: %

Build:
Build:
LAST BUILD BRANCH: nooptrace
DEFAULT BRANCH: master
Ran 23 Dec 2016 07:54PM UTC
Jobs 2
Files 123
Run time 58s
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
3537

push

travis-ci

abhinav
Add OutboundCall for call site options

This adds an `OutboundCall` type which allows encoding authors to provide a
`CallOption`-based interface to customize request behavior and receive
response headers. 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,

```
call := yarpc.NewOutboundCall(opts...)
req := transport.Request{
    // Fill with client-level information
    Caller: ...,
    Service: ...,
    // And the encoded request body
    Body: serialize(reqBody),
}

ctx, err := call.WriteToRequest(ctx, &req)
if err != nil {
    return err
}

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

ctx, err = call.ReadFromResponse(ctx, res)
if err != nil {
    return err
}
```

Issue: #617

5764 of 6728 relevant lines covered (85.67%)

1.81 hits per line

Jobs
ID Job ID Ran Files Coverage
3 3537.3 (TYPE=test) 23 Dec 2016 07:54PM UTC 0
85.67
Travis Job 3537.3
4 3537.4 (TYPE=test) 23 Dec 2016 07:54PM UTC 0
85.67
Travis Job 3537.4
Source Files on build 3537
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #3537
  • 3fb74704 on github
  • Prev Build on rm-meta (#3525)
  • Next Build on rm-meta (#3560)
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