Skip to content

Commit

Permalink
all: change import path to grpc.go4.org
Browse files Browse the repository at this point in the history
Follow-up to 9f3812d. Turns out the cmd/go tool doesn't like
having go4.org/* in one git repo and go4.org/grpc in a different repo.

Updates go4org/go4#30
  • Loading branch information
bradfitz committed Jun 9, 2017
1 parent 32ab3eb commit 11d0a25
Show file tree
Hide file tree
Showing 67 changed files with 204 additions and 204 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go:
- 1.6.3
- 1.7

go_import_path: go4.org/grpc
go_import_path: grpc.go4.org

before_install:
- if [[ $TRAVIS_GO_VERSION != 1.5* ]]; then go get github.com/golang/lint/golint; fi
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ and information about how to do so.

1. Check out the code:

$ go get go4.org/grpc
$ cd $GOPATH/src/go4.org/grpc
$ go get grpc.go4.org
$ cd $GOPATH/src/grpc.go4.org

1. Create a fork of the grpc-go repository.
1. Add your fork as a remote:
Expand Down
10 changes: 5 additions & 5 deletions Documentation/grpc-metadata.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ And concept of [metadata](http://www.grpc.io/docs/guides/concepts.html#metadata)

## Constructing metadata

A metadata can be created using package [metadata](https://godoc.org/go4.org/grpc/metadata).
A metadata can be created using package [metadata](https://godoc.org/grpc.go4.org/metadata).
The type MD is actually a map from string to a list of strings:

```go
Expand Down Expand Up @@ -102,7 +102,7 @@ Metadata that a client can receive includes header and trailer.

#### Unary call

Header and trailer sent along with a unary call can be retrieved using function [Header](https://godoc.org/go4.org/grpc#Header) and [Trailer](https://godoc.org/google.golang.org/grpc#Trailer) in [CallOption](https://godoc.org/google.golang.org/grpc#CallOption):
Header and trailer sent along with a unary call can be retrieved using function [Header](https://godoc.org/grpc.go4.org#Header) and [Trailer](https://godoc.org/grpc.go4.org#Trailer) in [CallOption](https://godoc.org/grpc.go4.org#CallOption):

```go
var header, trailer metadata.MD // variable to store header and trailer
Expand All @@ -124,7 +124,7 @@ For streaming calls including:
- Client streaming RPC
- Bidirectional streaming RPC

Header and trailer can be retrieved from the returned stream using function `Header` and `Trailer` in interface [ClientStream](https://godoc.org/go4.org/grpc#ClientStream):
Header and trailer can be retrieved from the returned stream using function `Header` and `Trailer` in interface [ClientStream](https://godoc.org/grpc.go4.org#ClientStream):

```go
stream, err := client.SomeStreamingRPC(ctx)
Expand Down Expand Up @@ -170,7 +170,7 @@ func (s *server) SomeStreamingRPC(stream pb.Service_SomeStreamingRPCServer) erro

#### Unary call

To send header and trailer to client in unary call, the server can call [SendHeader](https://godoc.org/go4.org/grpc#SendHeader) and [SetTrailer](https://godoc.org/google.golang.org/grpc#SetTrailer) functions in module [grpc](https://godoc.org/google.golang.org/grpc).
To send header and trailer to client in unary call, the server can call [SendHeader](https://godoc.org/grpc.go4.org#SendHeader) and [SetTrailer](https://godoc.org/grpc.go4.org#SetTrailer) functions in module [grpc](https://godoc.org/grpc.go4.org).
These two functions take a context as the first parameter.
It should be the RPC handler's context or one derived from it:

Expand All @@ -187,7 +187,7 @@ func (s *server) SomeRPC(ctx context.Context, in *pb.someRequest) (*pb.someRespo

#### Streaming call

For streaming calls, header and trailer can be sent using function `SendHeader` and `SetTrailer` in interface [ServerStream](https://godoc.org/go4.org/grpc#ServerStream):
For streaming calls, header and trailer can be sent using function `SendHeader` and `SetTrailer` in interface [ServerStream](https://godoc.org/grpc.go4.org#ServerStream):

```go
func (s *server) SomeStreamingRPC(stream pb.Service_SomeStreamingRPCServer) error {
Expand Down
6 changes: 3 additions & 3 deletions Documentation/server-reflection-tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ For example, to enable server reflection in `example/helloworld`, we need to mak
+++ b/examples/helloworld/greeter_server/main.go
@@ -40,6 +40,7 @@ import (
"context"
"go4.org/grpc"
pb "go4.org/grpc/examples/helloworld/helloworld"
+ "go4.org/grpc/reflection"
"grpc.go4.org"
pb "grpc.go4.org/examples/helloworld/helloworld"
+ "grpc.go4.org/reflection"
)

const (
Expand Down
16 changes: 8 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
all: test testrace

deps:
go get -d -v go4.org/grpc/...
go get -d -v grpc.go4.org/...

updatedeps:
go get -d -v -u -f go4.org/grpc/...
go get -d -v -u -f grpc.go4.org/...

testdeps:
go get -d -v -t go4.org/grpc/...
go get -d -v -t grpc.go4.org/...

updatetestdeps:
go get -d -v -t -u -f go4.org/grpc/...
go get -d -v -t -u -f grpc.go4.org/...

build: deps
go build go4.org/grpc/...
go build grpc.go4.org/...

proto:
@ if ! which protoc > /dev/null; then \
Expand All @@ -27,13 +27,13 @@ proto:
done

test: testdeps
go test -v -cpu 1,4 go4.org/grpc/...
go test -v -cpu 1,4 grpc.go4.org/...

testrace: testdeps
go test -v -race -cpu 1,4 go4.org/grpc/...
go test -v -race -cpu 1,4 grpc.go4.org/...

clean:
go clean -i go4.org/grpc/...
go clean -i grpc.go4.org/...

coverage: testdeps
./coverage.sh --coveralls
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Go's native HTTP/2 implementation. (Preliminary prototypes suggest most of it.)
Installation
------------

`go install go4.org/grpc`
`go install grpc.go4.org`

Prerequisites
-------------
Expand Down
6 changes: 3 additions & 3 deletions benchmark/benchmark.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ import (
"net"

"context"
"go4.org/grpc"
testpb "go4.org/grpc/benchmark/grpc_testing"
"go4.org/grpc/grpclog"
"grpc.go4.org"
testpb "grpc.go4.org/benchmark/grpc_testing"
"grpc.go4.org/grpclog"
)

func newPayload(t testpb.PayloadType, size int) *testpb.Payload {
Expand Down
8 changes: 4 additions & 4 deletions benchmark/benchmark_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import (
"time"

"context"
"go4.org/grpc"
testpb "go4.org/grpc/benchmark/grpc_testing"
"go4.org/grpc/benchmark/stats"
"go4.org/grpc/grpclog"
"grpc.go4.org"
testpb "grpc.go4.org/benchmark/grpc_testing"
"grpc.go4.org/benchmark/stats"
"grpc.go4.org/grpclog"
)

func runUnary(b *testing.B, maxConcurrentCalls int) {
Expand Down
10 changes: 5 additions & 5 deletions benchmark/client/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ import (
"time"

"context"
"go4.org/grpc"
"go4.org/grpc/benchmark"
testpb "go4.org/grpc/benchmark/grpc_testing"
"go4.org/grpc/benchmark/stats"
"go4.org/grpc/grpclog"
"grpc.go4.org"
"grpc.go4.org/benchmark"
testpb "grpc.go4.org/benchmark/grpc_testing"
"grpc.go4.org/benchmark/stats"
"grpc.go4.org/grpclog"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion benchmark/grpc_testing/services.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions benchmark/server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
_ "net/http/pprof"
"time"

"go4.org/grpc/benchmark"
"go4.org/grpc/grpclog"
"grpc.go4.org/benchmark"
"grpc.go4.org/grpclog"
)

var (
Expand Down
14 changes: 7 additions & 7 deletions benchmark/worker/benchmark_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ import (
"time"

"context"
"go4.org/grpc"
"go4.org/grpc/benchmark"
testpb "go4.org/grpc/benchmark/grpc_testing"
"go4.org/grpc/benchmark/stats"
"go4.org/grpc/codes"
"go4.org/grpc/credentials"
"go4.org/grpc/grpclog"
"grpc.go4.org"
"grpc.go4.org/benchmark"
testpb "grpc.go4.org/benchmark/grpc_testing"
"grpc.go4.org/benchmark/stats"
"grpc.go4.org/codes"
"grpc.go4.org/credentials"
"grpc.go4.org/grpclog"
)

var (
Expand Down
14 changes: 7 additions & 7 deletions benchmark/worker/benchmark_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,16 @@ import (
"sync"
"time"

"go4.org/grpc"
"go4.org/grpc/benchmark"
testpb "go4.org/grpc/benchmark/grpc_testing"
"go4.org/grpc/codes"
"go4.org/grpc/credentials"
"go4.org/grpc/grpclog"
"grpc.go4.org"
"grpc.go4.org/benchmark"
testpb "grpc.go4.org/benchmark/grpc_testing"
"grpc.go4.org/codes"
"grpc.go4.org/credentials"
"grpc.go4.org/grpclog"
)

var (
// File path related to go4.org/grpc.
// File path related to grpc.go4.org.
certFile = "benchmark/server/testdata/server1.pem"
keyFile = "benchmark/server/testdata/server1.key"
)
Expand Down
8 changes: 4 additions & 4 deletions benchmark/worker/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ import (
"time"

"context"
"go4.org/grpc"
testpb "go4.org/grpc/benchmark/grpc_testing"
"go4.org/grpc/codes"
"go4.org/grpc/grpclog"
"grpc.go4.org"
testpb "grpc.go4.org/benchmark/grpc_testing"
"grpc.go4.org/codes"
"grpc.go4.org/grpclog"
)

var (
Expand Down
6 changes: 3 additions & 3 deletions benchmark/worker/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ import (
)

// abs returns the absolute path the given relative file or directory path,
// relative to the go4.org/grpc directory in the user's GOPATH.
// relative to the grpc.go4.org directory in the user's GOPATH.
// If rel is already absolute, it is returned unmodified.
func abs(rel string) string {
if filepath.IsAbs(rel) {
return rel
}
v, err := goPackagePath("go4.org/grpc")
v, err := goPackagePath("grpc.go4.org")
if err != nil {
log.Fatalf("Error finding go4.org/grpc/testdata directory: %v", err)
log.Fatalf("Error finding grpc.go4.org/testdata directory: %v", err)
}
return filepath.Join(v, rel)
}
Expand Down
6 changes: 3 additions & 3 deletions call.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ import (
"time"

"context"
"go4.org/grpc/codes"
"go4.org/grpc/metadata"
"go4.org/grpc/stats"
"grpc.go4.org/codes"
"grpc.go4.org/metadata"
"grpc.go4.org/stats"
"golang.org/x/net/trace"
)

Expand Down
4 changes: 2 additions & 2 deletions call_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ import (
"time"

"context"
"go4.org/grpc/codes"
"go4.org/grpc/transport"
"grpc.go4.org/codes"
"grpc.go4.org/transport"
)

var (
Expand Down
4 changes: 2 additions & 2 deletions clientconn.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ import (
"fmt"
"net/http"

"go4.org/grpc/credentials"
"go4.org/grpc/stats"
"grpc.go4.org/credentials"
"grpc.go4.org/stats"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion clientconn_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ import (

"context"

"go4.org/grpc/credentials"
"grpc.go4.org/credentials"
)

const tlsDir = "testdata/"
Expand Down
2 changes: 1 addition & 1 deletion codes/codes.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

// Package codes defines the canonical error codes used by gRPC. It is
// consistent across various languages.
package codes // import "go4.org/grpc/codes"
package codes // import "grpc.go4.org/codes"

// A Code is an unsigned 32-bit error code as defined in the gRPC spec.
type Code uint32
Expand Down
4 changes: 2 additions & 2 deletions coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ set -e
workdir=.cover
profile="$workdir/cover.out"
mode=set
end2endtest="go4.org/grpc/test"
end2endtest="grpc.go4.org/test"

generate_cover_data() {
rm -rf "$workdir"
mkdir "$workdir"

for pkg in "$@"; do
if [ $pkg == "go4.org/grpc" -o $pkg == "google.golang.org/grpc/transport" -o $pkg == "google.golang.org/grpc/metadata" -o $pkg == "google.golang.org/grpc/credentials" ]
if [ $pkg == "grpc.go4.org" -o $pkg == "grpc.go4.org/transport" -o $pkg == "grpc.go4.org/metadata" -o $pkg == "grpc.go4.org/credentials" ]
then
f="$workdir/$(echo $pkg | tr / -)"
go test -covermode="$mode" -coverprofile="$f.cover" "$pkg"
Expand Down
2 changes: 1 addition & 1 deletion credentials/credentials.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
// which encapsulate all the state needed by a client to authenticate with a
// server and make various assertions, e.g., about the client's identity, role,
// or whether it is authorized to make a particular call.
package credentials // import "go4.org/grpc/credentials"
package credentials // import "grpc.go4.org/credentials"

import (
"crypto/tls"
Expand Down
2 changes: 1 addition & 1 deletion credentials/oauth/oauth.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import (
"io/ioutil"

"context"
"go4.org/grpc/credentials"
"grpc.go4.org/credentials"
"golang.org/x/oauth2"
"golang.org/x/oauth2/google"
"golang.org/x/oauth2/jwt"
Expand Down
2 changes: 1 addition & 1 deletion doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ https://github.com/grpc/grpc-go. For information about this experimental
version, see https://github.com/go4org/grpc
*/
package grpc // import "go4.org/grpc"
package grpc // import "grpc.go4.org"
4 changes: 2 additions & 2 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ INSTALL
-------

```
$ go get -u go4.org/grpc/examples/helloworld/greeter_client
$ go get -u go4.org/grpc/examples/helloworld/greeter_server
$ go get -u grpc.go4.org/examples/helloworld/greeter_client
$ go get -u grpc.go4.org/examples/helloworld/greeter_server
```

TRY IT!
Expand Down
Loading

0 comments on commit 11d0a25

Please sign in to comment.