A message passing platform for Go
Clone or download
abhinav staticcheck: Address issues
This addresses the following staticcheck issues:

```
api/encoding/stream.go:26:2: func StreamOption.unimplemented is unused (U1000)
api/transport/transporttest/context.go:81:10: should use time.Until instead of t.Sub(time.Now()) (S1024)
encoding/protobuf/protoc-gen-yarpc-go/internal/lib/lib.go:670:24: error strings should not be capitalized (ST1005)
encoding/thrift/thriftrw-plugin-yarpc/fx_test.go:80:3: should replace loop with *procs = append(*procs, p.SingleProcedures...) (S1011)
internal/bufferpool/bufferpool_test.go:49:34: should use sink.String() instead of string(sink.Bytes()) (S1030)
internal/bufferpool/bufferpool_test.go:169:3: const numIterations is unused (U1000)
internal/clock/fake.go:37:2: field addLock is unused (U1000)
internal/crossdock/client/tchclient/behavior.go:36:5: var log is unused (U1000)
internal/crossdock/server/http/timeout.go:36:46: should use time.Since instead of time.Now().Sub (S1012)
internal/crossdock/server/tch/timeout.go:43:46: should use time.Since instead of time.Now().Sub (S1012)
internal/crossdock/server/yarpc/sleep.go:50:2: should use a simple channel send/receive instead of select with a single case (S1000)
internal/service-test/cmd.go:114:24: should use c.stdout.String() instead of string(c.stdout.Bytes()) (S1030)
peer/peerlist/list.go:187:3: unnecessary guard around call to delete (S1033)
peer/peerlist/v2/list.go:210:3: unnecessary guard around call to delete (S1033)
peer/roundrobin/peerring.go:33:5: var errUnavailable is unused (U1000)
peer/x/peerheap/heap.go:31:2: field transport is unused (U1000)
pkg/lifecycle/once.go:108:35: should use make(chan struct{}) instead (S1019)
pkg/lifecycle/once.go:109:35: should use make(chan struct{}) instead (S1019)
pkg/lifecycle/once.go:110:35: should use make(chan struct{}) instead (S1019)
router_test.go:230:6: func IgnoreTestRouterWithMiddleware is unused (U1000)
transport/grpc/outbound.go:54:2: field lock is unused (U1000)
transport/http/peer.go:58:34: should use make(chan struct{}) instead (S1019)
transport/http/roundtrip_test.go:66:2: should merge variable declaration with assignment on next line (S1021)
transport/tchannel/channel_outbound_test.go:295:3: field getOutbound is unused (U1000)
transport/tchannel/channel_transport.go:102:2: field name is unused (U1000)
transport/tchannel/peer.go:52:34: should use make(chan struct{}) instead (S1019)
transport/tchannel/transport.go:65:2: field initialConnRetryDelay is unused (U1000)
transport/tchannel/transport.go:66:2: field connRetryBackoffFactor is unused (U1000)
x/yarpctest/service.go:152:2: field closer is unused (U1000)
x/yarpctest/types/stream.go:70:2: redundant return statement (S1023)
x/yarpctest/types/stream.go:116:2: redundant return statement (S1023)
yarpcconfig/chooser.go:242:2: default case should be first or last in switch statement (ST1015)
yarpcconfig/chooser.go:296:2: default case should be first or last in switch statement (ST1015)
yarpcconfig/mock_transport_spec_test.go:148:6: type anyKitMatcher is unused (U1000)
yarpcconfig/mock_transport_spec_test.go:159:5: var anyKit is unused (U1000)
yarpcconfig/spec.go:294:25: error strings should not be capitalized (ST1005)
yarpcconfig/spec.go:481:25: error strings should not be capitalized (ST1005)
yarpcconfig/spec.go:526:25: error strings should not be capitalized (ST1005)
yarpcconfig/spec.go:583:25: error strings should not be capitalized (ST1005)
yarpcconfig/spec.go:639:25: error strings should not be capitalized (ST1005)
yarpctest/fake_transport_test.go:48:30: should use make(chan struct{}) instead (S1019)
yarpctest/fake_transport_test.go:70:30: should use make(chan struct{}) instead (S1019)
```

Only the first one (unused `unimplemented()` method) was ignored.
Latest commit 6151af6 Jan 15, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.buildkite ci: Switch to Go 1.10 and 1.11 (#1708) Jan 15, 2019
.github Add Github PR template (#1196) Jul 12, 2017
api staticcheck: Address issues Jan 15, 2019
encoding staticcheck: Address issues Jan 15, 2019
etc proto/internal: Delete golden test (#1711) Jan 15, 2019
internal staticcheck: Address issues Jan 15, 2019
peer staticcheck: Address issues Jan 15, 2019
pkg staticcheck: Address issues Jan 15, 2019
serialize Update generated code at 2019-01-15T15:07:02 Jan 15, 2019
transport staticcheck: Address issues Jan 15, 2019
x staticcheck: Address issues Jan 15, 2019
yarpcconfig staticcheck: Address issues Jan 15, 2019
yarpcerrors Update license headers (#1700) Jan 4, 2019
yarpcproto Update generated code at 2019-01-15T15:07:02 Jan 15, 2019
yarpctest staticcheck: Address issues Jan 15, 2019
.codecov.yml proto/internal: Delete golden test (#1711) Jan 15, 2019
.dockerignore Add tls.Config options for gRPC client and server (#1496) Aug 2, 2018
.gitignore Add tls.Config options for gRPC client and server (#1496) Aug 2, 2018
CHANGELOG.md Fix peer list lock (#1664) Nov 21, 2018
CODE_OF_CONDUCT.md Add a code of conduct (#1439) Feb 19, 2018
Dockerfile.1.10 ci: Switch to Go 1.10 and 1.11 (#1708) Jan 15, 2019
Dockerfile.1.11 ci: Switch to Go 1.10 and 1.11 (#1708) Jan 15, 2019
LICENSE license Mar 29, 2016
Makefile Delete docker-compose crossdock testing (#1368) Nov 27, 2017
README.md build: Switch to BuildKite (#1478) Apr 24, 2018
RELEASE.md RELEASE.md: Pull Request-based flow (#1576) Oct 2, 2018
ack.go Update license headers (#1700) Jan 4, 2019
bench_test.go Update license headers (#1700) Jan 4, 2019
call.go Update license headers (#1700) Jan 4, 2019
call_test.go Update license headers (#1700) Jan 4, 2019
client_config.go Update license headers (#1700) Jan 4, 2019
config.go Update license headers (#1700) Jan 4, 2019
dispatcher.go Update license headers (#1700) Jan 4, 2019
dispatcher_example_test.go Update license headers (#1700) Jan 4, 2019
dispatcher_startup.go Update license headers (#1700) Jan 4, 2019
dispatcher_test.go Update license headers (#1700) Jan 4, 2019
doc.go Update license headers (#1700) Jan 4, 2019
docker-compose.yml ci: Switch to Go 1.10 and 1.11 (#1708) Jan 15, 2019
dockerdeps.mk Move build to etc/make and scripts to etc/bin (#1193) Jul 9, 2017
errors.go Update license headers (#1700) Jan 4, 2019
errors_test.go Update license headers (#1700) Jan 4, 2019
glide.lock glide: Add tools.go and move to imports Jan 15, 2019
glide.yaml glide: Add tools.go and move to imports Jan 15, 2019
header.go Update license headers (#1700) Jan 4, 2019
header_test.go Update license headers (#1700) Jan 4, 2019
inject.go Update license headers (#1700) Jan 4, 2019
inject_test.go Update license headers (#1700) Jan 4, 2019
introspection.go Update license headers (#1700) Jan 4, 2019
middleware.go Update license headers (#1700) Jan 4, 2019
middleware_test.go Update license headers (#1700) Jan 4, 2019
router.go Update license headers (#1700) Jan 4, 2019
router_test.go staticcheck: Address issues Jan 15, 2019
tools.go glide: Add tools.go and move to imports Jan 15, 2019
tracing.go Update license headers (#1700) Jan 4, 2019
version.go Update license headers (#1700) Jan 4, 2019

README.md

yarpc GoDoc GitHub release Mit License Build Status Coverage Status

A message passing platform for Go that lets you:

  • Write servers and clients with various encodings, including JSON, Thrift, and Protobuf.
  • Expose servers over many transports simultaneously, including HTTP/1.1, gRPC, and TChannel.
  • Migrate outbound calls between transports without any code changes using config.

Installation

We recommend locking to SemVer range ^1 using Glide:

glide get 'go.uber.org/yarpc#^1'

Stability

This library is v1 and follows SemVer strictly.

No breaking changes will be made to exported APIs before v2.0.0 with the exception of experimental packages.

Experimental packages reside within packages named x, and are not stable. This means their APIs can break at any time. The intention here is to validate these APIs and iterate on them by working closely with internal customers. Once stable, their contents will be moved out of the containing x package and their APIs will be locked.