Update Tyk-protobuf Repo

We use a go-based GRPC server, and leverage GitHub - TykTechnologies/tyk-protobuf: Protocol Buffer definitions for Tyk gRPC middlewares. for our definitions.

We would like to implement the latest features in TykV2.5 (Method in the request object).

Please update this repo with the latest bindings.

Hi Arturo, please use this directory to get the latest definitions.

1 Like

When I swapped my go import to "github.com/TykTechnologies/tyk/coprocess"

I got the following errors:

./main.go:81:39: cannot use s (type *"google.golang.org/grpc".Server) as type *"github.com/TykTechnologies/tyk/vendor/google.golang.org/grpc".Server in argument to coprocess.RegisterDispatcherServer
./main.go:83:18: cannot use Dispatcher literal (type *Dispatcher) as type coprocess.DispatcherServer in argument to coprocess.RegisterDispatcherServer:
        *Dispatcher does not implement coprocess.DispatcherServer (wrong type for Dispatch method)
                have Dispatch("context".Context, *coprocess.Object) (*coprocess.Object, error)
                want Dispatch("github.com/TykTechnologies/tyk/vendor/golang.org/x/net/context".Context, *coprocess.Object) (*coprocess.Object, error)

Any idea how I can resolve it so it doesn’t require your vendor?

This is my full import:

import (
    "log"
    "net"
    "flag"
    "os"
    "os/signal"
    "syscall"
    "google.golang.org/grpc"
    "github.com/TykTechnologies/tyk/coprocess"
)

This is a known issue, look at this ticket, also a related one.
Have you tried generating your own bindings? This is the official guide, we suggest this in our docs as well, currently we don’t have a Go tutorial.

alrighty, I pulled it into our repo. Thanks

No problem, let us know if you find any issue