Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TemplateEngine ¶
type TemplateEngine interface { // Note: below methods only need to implement extra / engine specific functionality // basic request compilation , callbacks , cli output callback etc are handled by `TemplateExecuter` and no need to do it again // Extra Compilation (if any) Compile() error // ExecuteWithResults executes the template and returns results ExecuteWithResults(input *contextargs.Context, callback protocols.OutputEventCallback) error // Name returns name of template engine Name() string }
TemplateEngine is a template executor with different functionality Ex: 1. generic => executes all protocol requests one after another (Done) 2. flow => executes protocol requests based on how they are defined in flow (Done) 3. multiprotocol => executes multiple protocols in parallel (Done)
type TemplateExecuter ¶
type TemplateExecuter struct {
// contains filtered or unexported fields
}
TemplateExecutor is an executor for a template
func NewTemplateExecuter ¶
func NewTemplateExecuter(requests []protocols.Request, options *protocols.ExecutorOptions) *TemplateExecuter
NewTemplateExecuter creates a new request TemplateExecuter for list of requests
func (*TemplateExecuter) Compile ¶
func (e *TemplateExecuter) Compile() error
Compile compiles the execution generators preparing any requests possible.
func (*TemplateExecuter) Execute ¶
func (e *TemplateExecuter) Execute(input *contextargs.Context) (bool, error)
Execute executes the protocol group and returns true or false if results were found.
func (*TemplateExecuter) ExecuteWithResults ¶
func (e *TemplateExecuter) ExecuteWithResults(input *contextargs.Context, callback protocols.OutputEventCallback) error
ExecuteWithResults executes the protocol requests and returns results instead of writing them.
func (*TemplateExecuter) Requests ¶
func (e *TemplateExecuter) Requests() int
Requests returns the total number of requests the rule will perform