From 63604cf8cd1711d1559e5e34540b23a0e4db3cb0 Mon Sep 17 00:00:00 2001 From: Toran Sahu Date: Sat, 28 Mar 2020 01:14:40 +0530 Subject: [PATCH] add MachineServer interface - Simple RPC --- server/machine.go | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 server/machine.go diff --git a/server/machine.go b/server/machine.go new file mode 100644 index 0000000..3f028e2 --- /dev/null +++ b/server/machine.go @@ -0,0 +1,23 @@ +// +// machine.go +// Copyright (C) 2020 Toran Sahu +// +// Distributed under terms of the MIT license. +// + +package server + +import ( + "context" + + "github.com/toransahu/grpc-eg-go/machine" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" +) + +type MachineServer struct{} + +// Execute runs the set of instructions given. +func (s *MachineServer) Execute(ctx context.Context, instructions *machine.InstructionSet) (*machine.Result, error) { + return nil, status.Error(codes.Unimplemented, "Execute() not implemented yet") +}