Documentation ¶
Index ¶
- type MasterNode
- type NodeInfo
- type ProgramNode
- func (p *ProgramNode) Load(ctx context.Context, in *pb.LoadMessage) (*empty.Empty, error)
- func (p *ProgramNode) LoadProgram(s string) error
- func (p *ProgramNode) Pause(ctx context.Context, in *empty.Empty) (*empty.Empty, error)
- func (p *ProgramNode) Reset(ctx context.Context, in *empty.Empty) (*empty.Empty, error)
- func (p *ProgramNode) Run(ctx context.Context, in *empty.Empty) (*empty.Empty, error)
- func (p *ProgramNode) Send(ctx context.Context, in *pb.SendMessage) (*empty.Empty, error)
- func (p *ProgramNode) Start()
- type StackNode
- func (s *StackNode) Pause(ctx context.Context, in *empty.Empty) (*empty.Empty, error)
- func (s *StackNode) Pop(ctx context.Context, in *empty.Empty) (*pb.ValueMessage, error)
- func (s *StackNode) Push(ctx context.Context, in *pb.ValueMessage) (*empty.Empty, error)
- func (s *StackNode) Reset(ctx context.Context, in *empty.Empty) (*empty.Empty, error)
- func (s *StackNode) Run(ctx context.Context, in *empty.Empty) (*empty.Empty, error)
- func (s *StackNode) Start()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MasterNode ¶
type MasterNode struct { pb.UnimplementedMasterServer // contains filtered or unexported fields }
MasterNode is a master node
func NewMasterNode ¶
func NewMasterNode(nodeInfo map[string]NodeInfo, certFile, keyFile string) *MasterNode
NewMasterNode creates a new master node
func (*MasterNode) GetInput ¶
func (m *MasterNode) GetInput(ctx context.Context, in *empty.Empty) (*pb.ValueMessage, error)
GetInput handles request to get input from master node
func (*MasterNode) SendOutput ¶
func (m *MasterNode) SendOutput(ctx context.Context, in *pb.ValueMessage) (*empty.Empty, error)
SendOutput handles request to send output to master node
type NodeInfo ¶
type NodeInfo struct {
Type string `json:"type"`
}
NodeInfo contains information about nodes
type ProgramNode ¶
type ProgramNode struct { pb.UnimplementedProgramServer // contains filtered or unexported fields }
ProgramNode is a program node that interprets TIS-100 asm
func NewProgramNode ¶
func NewProgramNode(masterURI string, certFile, keyFile string) *ProgramNode
NewProgramNode creates a new program node
func (*ProgramNode) Load ¶
func (p *ProgramNode) Load(ctx context.Context, in *pb.LoadMessage) (*empty.Empty, error)
Load handles request to reset node and load asm program
func (*ProgramNode) LoadProgram ¶
func (p *ProgramNode) LoadProgram(s string) error
LoadProgram loads program onto node
func (*ProgramNode) Send ¶
func (p *ProgramNode) Send(ctx context.Context, in *pb.SendMessage) (*empty.Empty, error)
Send handles request for sending value to node
type StackNode ¶
type StackNode struct { pb.UnimplementedStackServer // contains filtered or unexported fields }
StackNode is a stack node
func NewStackNode ¶
NewStackNode creates a new stack node
Click to show internal directories.
Click to hide internal directories.