Documentation ¶
Index ¶
- Constants
- type AgentExecutor
- type EchoExecutor
- func (exc *EchoExecutor) GetLogger() *dlog.Logger
- func (exc *EchoExecutor) LoggerIdentity(justCallMe func() *dlog.Identity) *dlog.Identity
- func (exc *EchoExecutor) SetLogger(logger *dlog.Logger)
- func (exc *EchoExecutor) Start(ctx context.Context) error
- func (exc *EchoExecutor) Status() (ExecutorStatus, error)
- type Executor
- type ExecutorStatus
- type LocalExecutor
- type Manager
- func (m *Manager) GetLogger() *dlog.Logger
- func (m *Manager) Id() string
- func (m *Manager) LoggerIdentity(justCallMe func() *dlog.Identity) *dlog.Identity
- func (m *Manager) Plan() error
- func (m *Manager) SetAssignedNodes(nodes []pb.AssignedNode)
- func (m *Manager) SetLogger(logger *dlog.Logger)
- func (m *Manager) SetSpec(spec pb.JobSpec)
- func (m *Manager) Start(ctx context.Context) error
- type MockExecutor
- type Planner
- func (p *Planner) GetLogger() *dlog.Logger
- func (p *Planner) Job(nodes []pb.AssignedNode, jobSpec pb.JobSpec) (pb.JobPlan, error)
- func (p *Planner) LoggerIdentity(justCallMe func() *dlog.Identity) *dlog.Identity
- func (p *Planner) SetLogger(logger *dlog.Logger)
- func (p *Planner) Stage(nodes []pb.AssignedNode, stageSpec pb.StageSpec) (pb.StagePlan, error)
- func (p *Planner) Task(nodes []pb.AssignedNode, taskSpec pb.TaskSpec) (pb.TaskPlan, error)
Constants ¶
View Source
const ( ExecutorUnknown = iota ExecutorIdle ExecutorRunning ExecutorFinished ExecutorError )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgentExecutor ¶
AgentExecutor dispatch plan to node agent on worker nodes
func NewAgentExecutor ¶
func NewAgentExecutor() *AgentExecutor
func (*AgentExecutor) GetLogger ¶
func (exc *AgentExecutor) GetLogger() *dlog.Logger
func (*AgentExecutor) LoggerIdentity ¶
func (exc *AgentExecutor) LoggerIdentity(justCallMe func() *dlog.Identity) *dlog.Identity
func (*AgentExecutor) SetLogger ¶
func (exc *AgentExecutor) SetLogger(logger *dlog.Logger)
type EchoExecutor ¶
type EchoExecutor struct {
// contains filtered or unexported fields
}
EchoExecutor output command it should run to io.Writer
func NewEchoExecutor ¶
func (*EchoExecutor) GetLogger ¶
func (exc *EchoExecutor) GetLogger() *dlog.Logger
func (*EchoExecutor) LoggerIdentity ¶
func (exc *EchoExecutor) LoggerIdentity(justCallMe func() *dlog.Identity) *dlog.Identity
func (*EchoExecutor) SetLogger ¶
func (exc *EchoExecutor) SetLogger(logger *dlog.Logger)
func (*EchoExecutor) Status ¶
func (exc *EchoExecutor) Status() (ExecutorStatus, error)
type Executor ¶
type Executor interface { // Start dispatch/run the plan but does not wait for it to complete Start(ctx context.Context) error Status() (ExecutorStatus, error) }
Executor runs a stage plan on a single node, coordination between nodes is done by manager - simply print command out (for dry run) - run everything locally, assume the job spec can be run locally, i.e. everything is localhost - dispatch job to remote agent
type ExecutorStatus ¶
type ExecutorStatus uint8
type LocalExecutor ¶
func (*LocalExecutor) GetLogger ¶
func (exc *LocalExecutor) GetLogger() *dlog.Logger
func (*LocalExecutor) LoggerIdentity ¶
func (exc *LocalExecutor) LoggerIdentity(justCallMe func() *dlog.Identity) *dlog.Identity
func (*LocalExecutor) SetLogger ¶
func (exc *LocalExecutor) SetLogger(logger *dlog.Logger)
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func NewManager() *Manager
func (*Manager) LoggerIdentity ¶
func (*Manager) SetAssignedNodes ¶
func (m *Manager) SetAssignedNodes(nodes []pb.AssignedNode)
type MockExecutor ¶
type MockExecutor struct {
// contains filtered or unexported fields
}
func (*MockExecutor) GetLogger ¶
func (exc *MockExecutor) GetLogger() *dlog.Logger
func (*MockExecutor) LoggerIdentity ¶
func (exc *MockExecutor) LoggerIdentity(justCallMe func() *dlog.Identity) *dlog.Identity
func (*MockExecutor) SetLogger ¶
func (exc *MockExecutor) SetLogger(logger *dlog.Logger)
Click to show internal directories.
Click to hide internal directories.