Documentation
¶
Index ¶
- func NewEmbeddedClient(taskchan chan string, cmdchan chan *NodeCommand, nodechan chan []string) metafora.Client
- func NewEmbeddedCoordinator(nodeid string, taskchan chan string, cmdchan chan *NodeCommand, ...) metafora.Coordinator
- func NewEmbeddedPair(nodeid string) (metafora.Coordinator, metafora.Client)
- type EmbeddedClient
- type EmbeddedCoordinator
- func (e *EmbeddedCoordinator) Claim(taskID string) bool
- func (e *EmbeddedCoordinator) Close()
- func (e *EmbeddedCoordinator) Command() (metafora.Command, error)
- func (e *EmbeddedCoordinator) Done(taskID string)
- func (e *EmbeddedCoordinator) Init(c metafora.CoordinatorContext) error
- func (e *EmbeddedCoordinator) Release(taskID string)
- func (e *EmbeddedCoordinator) Watch() (taskID string, err error)
- type NodeCommand
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewEmbeddedClient ¶
func NewEmbeddedClient(taskchan chan string, cmdchan chan *NodeCommand, nodechan chan []string) metafora.Client
func NewEmbeddedCoordinator ¶
func NewEmbeddedCoordinator(nodeid string, taskchan chan string, cmdchan chan *NodeCommand, nodechan chan []string) metafora.Coordinator
func NewEmbeddedPair ¶
func NewEmbeddedPair(nodeid string) (metafora.Coordinator, metafora.Client)
Returns a connected client/coordinator pair for embedded/testing use
Types ¶
type EmbeddedClient ¶
type EmbeddedClient struct {
// contains filtered or unexported fields
}
func (*EmbeddedClient) DeleteTask ¶
func (ec *EmbeddedClient) DeleteTask(taskid string) error
func (*EmbeddedClient) Nodes ¶
func (ec *EmbeddedClient) Nodes() ([]string, error)
func (*EmbeddedClient) SubmitCommand ¶
func (ec *EmbeddedClient) SubmitCommand(nodeid string, command metafora.Command) error
func (*EmbeddedClient) SubmitTask ¶
func (ec *EmbeddedClient) SubmitTask(taskid string) error
type EmbeddedCoordinator ¶
type EmbeddedCoordinator struct {
// contains filtered or unexported fields
}
Coordinator which listens for tasks on a channel
func (*EmbeddedCoordinator) Claim ¶
func (e *EmbeddedCoordinator) Claim(taskID string) bool
func (*EmbeddedCoordinator) Close ¶
func (e *EmbeddedCoordinator) Close()
func (*EmbeddedCoordinator) Command ¶
func (e *EmbeddedCoordinator) Command() (metafora.Command, error)
func (*EmbeddedCoordinator) Done ¶
func (e *EmbeddedCoordinator) Done(taskID string)
func (*EmbeddedCoordinator) Init ¶
func (e *EmbeddedCoordinator) Init(c metafora.CoordinatorContext) error
func (*EmbeddedCoordinator) Release ¶
func (e *EmbeddedCoordinator) Release(taskID string)
func (*EmbeddedCoordinator) Watch ¶
func (e *EmbeddedCoordinator) Watch() (taskID string, err error)
type NodeCommand ¶
Click to show internal directories.
Click to hide internal directories.