Documentation ¶
Index ¶
- Variables
- func RegisterGameOfLifeServer(s grpc.ServiceRegistrar, srv GameOfLifeServer)
- type GameOfLifeClient
- type GameOfLifeServer
- type GameRequest
- func (*GameRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GameRequest) GetBoard() string
- func (x *GameRequest) GetNumGens() int32
- func (*GameRequest) ProtoMessage()
- func (x *GameRequest) ProtoReflect() protoreflect.Message
- func (x *GameRequest) Reset()
- func (x *GameRequest) String() string
- type GameResponse
- func (*GameResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GameResponse) GetBoard() string
- func (x *GameResponse) GetCode() ResponseCode
- func (x *GameResponse) GetErrorMessage() string
- func (*GameResponse) ProtoMessage()
- func (x *GameResponse) ProtoReflect() protoreflect.Message
- func (x *GameResponse) Reset()
- func (x *GameResponse) String() string
- type ResponseCode
- func (ResponseCode) Descriptor() protoreflect.EnumDescriptor
- func (x ResponseCode) Enum() *ResponseCode
- func (ResponseCode) EnumDescriptor() ([]byte, []int)deprecated
- func (x ResponseCode) Number() protoreflect.EnumNumber
- func (x ResponseCode) String() string
- func (ResponseCode) Type() protoreflect.EnumType
- type UnimplementedGameOfLifeServer
- type UnsafeGameOfLifeServer
Constants ¶
This section is empty.
Variables ¶
var ( ResponseCode_name = map[int32]string{ 0: "UNKNOWN", 1: "OK", 2: "BAD_REQUEST", } ResponseCode_value = map[string]int32{ "UNKNOWN": 0, "OK": 1, "BAD_REQUEST": 2, } )
Enum value maps for ResponseCode.
var File_gameoflife_proto protoreflect.FileDescriptor
var GameOfLife_ServiceDesc = grpc.ServiceDesc{ ServiceName: "gameoflifepb.GameOfLife", HandlerType: (*GameOfLifeServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "RunGame", Handler: _GameOfLife_RunGame_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "gameoflife.proto", }
GameOfLife_ServiceDesc is the grpc.ServiceDesc for GameOfLife service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterGameOfLifeServer ¶
func RegisterGameOfLifeServer(s grpc.ServiceRegistrar, srv GameOfLifeServer)
Types ¶
type GameOfLifeClient ¶
type GameOfLifeClient interface {
RunGame(ctx context.Context, in *GameRequest, opts ...grpc.CallOption) (*GameResponse, error)
}
GameOfLifeClient is the client API for GameOfLife service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewGameOfLifeClient ¶
func NewGameOfLifeClient(cc grpc.ClientConnInterface) GameOfLifeClient
type GameOfLifeServer ¶
type GameOfLifeServer interface { RunGame(context.Context, *GameRequest) (*GameResponse, error) // contains filtered or unexported methods }
GameOfLifeServer is the server API for GameOfLife service. All implementations must embed UnimplementedGameOfLifeServer for forward compatibility
type GameRequest ¶
type GameRequest struct { Board string `protobuf:"bytes,1,opt,name=board,proto3" json:"board,omitempty"` NumGens int32 `protobuf:"varint,2,opt,name=num_gens,json=numGens,proto3" json:"num_gens,omitempty"` // contains filtered or unexported fields }
func (*GameRequest) Descriptor
deprecated
func (*GameRequest) Descriptor() ([]byte, []int)
Deprecated: Use GameRequest.ProtoReflect.Descriptor instead.
func (*GameRequest) GetBoard ¶
func (x *GameRequest) GetBoard() string
func (*GameRequest) GetNumGens ¶
func (x *GameRequest) GetNumGens() int32
func (*GameRequest) ProtoMessage ¶
func (*GameRequest) ProtoMessage()
func (*GameRequest) ProtoReflect ¶
func (x *GameRequest) ProtoReflect() protoreflect.Message
func (*GameRequest) Reset ¶
func (x *GameRequest) Reset()
func (*GameRequest) String ¶
func (x *GameRequest) String() string
type GameResponse ¶
type GameResponse struct { Code ResponseCode `protobuf:"varint,1,opt,name=code,proto3,enum=gameoflifepb.ResponseCode" json:"code,omitempty"` ErrorMessage string `protobuf:"bytes,2,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` Board string `protobuf:"bytes,3,opt,name=board,proto3" json:"board,omitempty"` // contains filtered or unexported fields }
func (*GameResponse) Descriptor
deprecated
func (*GameResponse) Descriptor() ([]byte, []int)
Deprecated: Use GameResponse.ProtoReflect.Descriptor instead.
func (*GameResponse) GetBoard ¶
func (x *GameResponse) GetBoard() string
func (*GameResponse) GetCode ¶
func (x *GameResponse) GetCode() ResponseCode
func (*GameResponse) GetErrorMessage ¶
func (x *GameResponse) GetErrorMessage() string
func (*GameResponse) ProtoMessage ¶
func (*GameResponse) ProtoMessage()
func (*GameResponse) ProtoReflect ¶
func (x *GameResponse) ProtoReflect() protoreflect.Message
func (*GameResponse) Reset ¶
func (x *GameResponse) Reset()
func (*GameResponse) String ¶
func (x *GameResponse) String() string
type ResponseCode ¶
type ResponseCode int32
const ( ResponseCode_UNKNOWN ResponseCode = 0 ResponseCode_OK ResponseCode = 1 ResponseCode_BAD_REQUEST ResponseCode = 2 )
func (ResponseCode) Descriptor ¶
func (ResponseCode) Descriptor() protoreflect.EnumDescriptor
func (ResponseCode) Enum ¶
func (x ResponseCode) Enum() *ResponseCode
func (ResponseCode) EnumDescriptor
deprecated
func (ResponseCode) EnumDescriptor() ([]byte, []int)
Deprecated: Use ResponseCode.Descriptor instead.
func (ResponseCode) Number ¶
func (x ResponseCode) Number() protoreflect.EnumNumber
func (ResponseCode) String ¶
func (x ResponseCode) String() string
func (ResponseCode) Type ¶
func (ResponseCode) Type() protoreflect.EnumType
type UnimplementedGameOfLifeServer ¶
type UnimplementedGameOfLifeServer struct { }
UnimplementedGameOfLifeServer must be embedded to have forward compatible implementations.
func (UnimplementedGameOfLifeServer) RunGame ¶
func (UnimplementedGameOfLifeServer) RunGame(context.Context, *GameRequest) (*GameResponse, error)
type UnsafeGameOfLifeServer ¶
type UnsafeGameOfLifeServer interface {
// contains filtered or unexported methods
}
UnsafeGameOfLifeServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to GameOfLifeServer will result in compilation errors.