Add stubs for server implementation
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
This commit is contained in:
parent
f06848c9e9
commit
e93156e71e
2 changed files with 102 additions and 0 deletions
24
cmd/server/main.go
Normal file
24
cmd/server/main.go
Normal file
|
@ -0,0 +1,24 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"log"
|
||||
"net"
|
||||
|
||||
"github.com/kubernetes/kubernetes/pkg/kubelet/api/v1alpha1/runtime"
|
||||
"github.com/mrunalp/ocid/server"
|
||||
"google.golang.org/grpc"
|
||||
)
|
||||
|
||||
const (
|
||||
port = ":49999"
|
||||
)
|
||||
|
||||
func main() {
|
||||
lis, err := net.Listen("tcp", port)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to listen: %v", err)
|
||||
}
|
||||
s := grpc.NewServer()
|
||||
runtime.RegisterRuntimeServiceServer(s, &server.Server{})
|
||||
s.Serve(lis)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue