Comments (2)
I made grpc.go
into its own binary:
[bluecmd]$ cat cmd/test/grpc.go
// Copyright 2018 the u-root Authors. All rights reserved
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
import (
"context"
"log"
"net"
pb "github.com/u-root/u-bmc/proto"
"google.golang.org/grpc"
"google.golang.org/grpc/reflection"
)
type mgmtServer struct {
}
func (m *mgmtServer) PressButton(ctx context.Context, r *pb.ButtonPressRequest) (*pb.ButtonPressResponse, error) {
log.Printf("Request: %v", *r)
return &pb.ButtonPressResponse{}, nil
}
func main() {
// TODO(bluecmd): Since we have no RNG, no configuration, etc
// only use http for now
l, err := net.Listen("tcp", "[::]:8080")
if err != nil {
log.Fatalf("could not listen: %v", err)
}
s := mgmtServer{}
g := grpc.NewServer()
pb.RegisterManagementServiceServer(g, &s)
reflection.Register(g)
g.Serve(l)
}
Building it with vendor/ present and call grpc_cli.
[bluecmd]$ grpc_cli call localhost:8080 bmc.ManagementService.PressButton 'button: POWER, duration_ms: 1000'
Method name not found
Failed to find method bmc.ManagementService.PressButton in proto files.
Method name not found
Method name not found
Failed to parse request.
Without vendor/:
[bluecmd]$ rm -fr ../../vendor/
[bluecmd]$ go build
[bluecmd]$ ./test &
[bluecmd]$ grpc_cli call localhost:8080 bmc.ManagementService.PressButton 'button: POWER, duration_ms: 1000'
connecting to localhost:8080
Rpc succeeded with OK status
from u-bmc.
Mitigated for now by removing vendoring
from u-bmc.
Related Issues (20)
- pkg/aspeed/lpc_mem.go arguments end up everywhere HOT 1
- Support Supermicro X11-SSH board HOT 9
- UBIFS failure
- Failure mode on image corruption
- diagnose-me command
- Build in repo directory fails // GOPATH HOT 5
- Use a Linux tar file instead of submodule HOT 4
- Speed up u-bmc boot HOT 3
- Linux config file is modified by build
- Measure effects of power management HOT 1
- Defconfig does not save all config options HOT 2
- Rename platform/aspeed-ast2500evb to ast2500evb HOT 2
- Make integration a proper platform HOT 2
- I was just given two Dell i610 power edge servers; and I want to add support for this library HOT 2
- Add implementation of go-tuf into u-bmc
- Utilize UBIFS authentication to detect offline disk changes
- Consider alternative to golang.org/x/crypto/openpgp
- Building qemu-virt-a15 fails
- README add instructions for generating test key
- Issue with go dependencies while building rootfs for qemu-virt-a72
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from u-bmc.