Documentation ¶
Index ¶
- Constants
- Variables
- func Generate(wr io.Writer, appID int) (err error)
- func Notify(title string, value int64) error
- func SetClientConnect(cc ClientConnector) error
- func Setup(groups []metrics.Group) error
- type ClientConnector
- type Executor
- func (e *Executor) Notify(title string, value int64) error
- func (e *Executor) Serve() (err error)
- func (e *Executor) Setup(groups []metrics.Group) error
- func (m *Executor) Start(ctx context.Context, req *pb.StartRequest) (*pb.StartResult, error)
- func (m *Executor) Terminate(ctx context.Context, req *pb.TermRequest) (*pb.TermResult, error)
- type Options
Constants ¶
const ( Idle status = "idle" Running status = "running" Finished status = "finished" )
Variables ¶
var ( ErrIDNotFound = errors.New("id not found") ErrNodeIsRunning = errors.New("driver is running") ErrAppCancel = errors.New("application is cancel") ErrAppPanic = errors.New("application is panic") )
Error
Functions ¶
func Notify ¶
Notify saves the id with value into metrics which later save to database Return error when the title is not found from the metric list. The not found error may occur because a. The title has never ever register before b. The session is cancel but the scenario does not handle the ctx.Done signal
func SetClientConnect ¶
func SetClientConnect(cc ClientConnector) error
SetClientConnect setup new clientConnectInstance. Use to support testing only
Types ¶
type ClientConnector ¶
type Executor ¶
type Executor struct {
// contains filtered or unexported fields
}
Executor struct
func NewExecutor ¶
NewExecutor creates a new executor also load the plugin from driver path
func (*Executor) Notify ¶
Notify saves the id with value into metrics which later save to database Return error when the title is not found from the metric list. The not found error may occur because a. The title has never ever register before b. The session is cancel but the scenario does not handle the ctx.Done signal
func (*Executor) Serve ¶
Serve starts a rpc server at the executor socket and connects to the agent via agent socket
func (*Executor) Start ¶
func (m *Executor) Start(ctx context.Context, req *pb.StartRequest) (*pb.StartResult, error)
Start begins to run the program
func (*Executor) Terminate ¶
func (m *Executor) Terminate(ctx context.Context, req *pb.TermRequest) (*pb.TermResult, error)
Terminate shutdown this executor process