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

Update Generated Proto Code #351

Merged
merged 10 commits into from
Sep 29, 2021
Merged
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
4 changes: 2 additions & 2 deletions cmd/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,15 +143,15 @@ func loop(c *cli.Context) error {
MinTime: c.Duration("keepalive-min-time"),
}),
)
droneServer := woodpeckerGrpcServer.NewDroneServer(
woodpeckerServer := woodpeckerGrpcServer.NewWoodpeckerServer(
remote_,
server.Config.Services.Queue,
server.Config.Services.Logs,
server.Config.Services.Pubsub,
store_,
server.Config.Server.Host,
)
proto.RegisterDroneServer(grpcServer, droneServer)
proto.RegisterWoodpeckerServer(grpcServer, woodpeckerServer)

err = grpcServer.Serve(lis)
if err != nil {
Expand Down
7 changes: 2 additions & 5 deletions pipeline/rpc/client_grpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,17 @@ import (
"google.golang.org/grpc/status"
)

// generate protobuffs
// protoc --go_out=plugins=grpc,import_path=proto:. *.proto

var backoff = time.Second

type client struct {
client proto.DroneClient
client proto.WoodpeckerClient
conn *grpc.ClientConn
}

// NewGrpcClient returns a new grpc Client.
func NewGrpcClient(conn *grpc.ClientConn) Peer {
client := new(client)
client.client = proto.NewDroneClient(conn)
client.client = proto.NewWoodpeckerClient(conn)
client.conn = conn
return client
}
Expand Down
Loading