Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

proto: Stop using deprecated module #22

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ to a string by default).
Jettison also provides gRPC middleware that automatically groups the errors
in a chain by the gRPC server (or "hop") they originated from.

See the `jettison/example` package for a more complete usage example, including
See the `jettison/_example` package for a more complete usage example, including
a gRPC server/client passing jettison errors over the wire.

```GO
Expand Down Expand Up @@ -87,7 +87,7 @@ An example log written via `log.Info`:
```JSON
{
"message": "entering the example function",
"source": "jettison/example/example.go:9",
"source": "jettison/_example/example.go:9",
"level": "info",
"parameters": [
{
Expand All @@ -102,15 +102,15 @@ An example log written via `log.Error`:
```JSON
{
"message": "a jettison error",
"source": "jettison/example/example.go:18",
"source": "jettison/_example/example.go:18",
"level": "error",
"hops": [
{
"binary": "example",
"errors": [
{
"message": "a jettison error",
"source": "jettison/example/example.go:14",
"source": "jettison/_example/example.go:14",
"parameters": [
{
"key": "key",
Expand Down
8 changes: 4 additions & 4 deletions README.md.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ to a string by default).
Jettison also provides gRPC middleware that automatically groups the errors
in a chain by the gRPC server (or "hop") they originated from.

See the `jettison/example` package for a more complete usage example, including
See the `jettison/_example` package for a more complete usage example, including
a gRPC server/client passing jettison errors over the wire.

```GO
Expand Down Expand Up @@ -66,7 +66,7 @@ An example log written via `log.Info`:
```JSON
{
"message": "entering the example function",
"source": "jettison/example/example.go:9",
"source": "jettison/_example/example.go:9",
"level": "info",
"parameters": [
{
Expand All @@ -81,15 +81,15 @@ An example log written via `log.Error`:
```JSON
{
"message": "a jettison error",
"source": "jettison/example/example.go:18",
"source": "jettison/_example/example.go:18",
"level": "error",
"hops": [
{
"binary": "example",
"errors": [
{
"message": "a jettison error",
"source": "jettison/example/example.go:14",
"source": "jettison/_example/example.go:14",
"parameters": [
{
"key": "key",
Expand Down
4 changes: 2 additions & 2 deletions example/doc.go → _example/doc.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Package main contains an example implementation of a gRPC server and client
// that use Jettison to communicate structed errors. You can run the example
// that use Jettison to communicate structured errors. You can run the example
// with the following command:
//
// `go run github.com/luno/jettison/example`
// `go run github.com/luno/jettison/_example`
package main
2 changes: 1 addition & 1 deletion example/example.go → _example/example.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
import (
"context"

"github.com/luno/jettison/example/serverclient"
"github.com/luno/jettison/_example/serverclient"
"github.com/luno/jettison/j"
"github.com/luno/jettison/log"
)
Expand Down
253 changes: 253 additions & 0 deletions _example/examplepb/example.pb.go

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

Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@ syntax = "proto3";

package examplepb;

option go_package = "../examplepb";

service Hopper {
rpc Hop(HopRequest) returns (Empty) {}
}
}

message Empty {}

message HopRequest{
message HopRequest {
int64 hops = 1;
}
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (

"google.golang.org/grpc"

"github.com/luno/jettison/_example/examplepb"
"github.com/luno/jettison/errors"
"github.com/luno/jettison/example/examplepb"
jetgrpc "github.com/luno/jettison/grpc"
"github.com/luno/jettison/j"
"github.com/luno/jettison/log"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (

"google.golang.org/grpc"

"github.com/luno/jettison/_example/examplepb"
"github.com/luno/jettison/errors"
"github.com/luno/jettison/example/examplepb"
jetgrpc "github.com/luno/jettison/grpc"
"github.com/luno/jettison/j"
"github.com/luno/jettison/log"
Expand Down
Loading
Loading