{"modulePath":"github.com/Fishwaldo/go-taskmanager","version":"v0.0.1","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package executionmiddleware\n\n## Types\n\n```go\ntype ConcurrentJobBlocker struct {\n\t// contains filtered or unexported fields\n}\n```\nConcurrentJobBlocker is a Middleware that will defer a job if one is already running\n\n```go\nfunc NewCJLock() *ConcurrentJobBlocker\n```\nNewCJLock Create a new ConcurrentJob Lock Middleware\n\n```go\nfunc (hth *ConcurrentJobBlocker) Initilize(s *taskmanager.Task)\n```\n\n```go\nfunc (hth *ConcurrentJobBlocker) PostHandler(s *taskmanager.Task, err error) taskmanager.MWResult\n```\n\n```go\nfunc (hth *ConcurrentJobBlocker) PreHandler(s *taskmanager.Task) (taskmanager.MWResult, error)\n```\n\n```go\nfunc (hth *ConcurrentJobBlocker) Reset(s *taskmanager.Task)\n```\n\n```go\ntype HasTagHandler struct {\n\t// contains filtered or unexported fields\n}\n```\nHasTagHandler is a Middleware that will Defer jobs if the Requirements are not meet Requirements are Specified as \"Tags\" (strings) and a Job has a list of Tags needed When a Job is about to be dispatched, the Jobs \"Required\" tags are compared against a list of \"available\" tags, and if the available tags does not match the required tags, the job is deferred (or canceled if there is no other Middleware after this one.)\n\n```go\nfunc NewTagHandler() *HasTagHandler\n```\nNewTagHandlerMW Create a new Tag Handler Middleware\n\n```go\nfunc (hth *HasTagHandler) DelHaveTags(tag string)\n```\nDelHaveTags Delete a tag indicating a resource is no longer available.\n\n```go\nfunc (hth *HasTagHandler) DelRequiredTags(tag string)\n```\nDelRequiredTags delete a tag that a job requires.\n\n```go\nfunc (hth *HasTagHandler) Initilize(s *taskmanager.Task)\n```\n\n```go\nfunc (hth *HasTagHandler) IsHaveTag(tag string) bool\n```\nIsHaveTag Test if a resource represented by tag is present\n\n```go\nfunc (hth *HasTagHandler) IsRequiredTag(tag string) bool\n```\nIsRequiredTag test if a resource requirement represented by tag is available\n\n```go\nfunc (hth *HasTagHandler) PostHandler(s *taskmanager.Task, err error) taskmanager.MWResult\n```\n\n```go\nfunc (hth *HasTagHandler) PreHandler(s *taskmanager.Task) (taskmanager.MWResult, error)\n```\nHandler Runs the Tag Handler before a job is dispatched.\n\n```go\nfunc (hth *HasTagHandler) Reset(s *taskmanager.Task)\n```\n\n```go\nfunc (hth *HasTagHandler) SetHaveTags(tag string)\n```\nSetHaveTags Set a tag indicating that a resource is available. Before a job runs with a Matching Required tag, it checks if its present.\n\n```go\nfunc (hth *HasTagHandler) SetRequiredTags(tag string)\n```\nSetRequiredTags add a tag that makes a job dependant upon a resource being available (set via SetHaveTag)\n\n","path":"github.com/Fishwaldo/go-taskmanager/middleware/executation","name":"executionmiddleware","synopsis":"","isRedistributable":true}
