Documentation ¶
Overview ¶
* Package runner provides a functionalities to run a set of some processes.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TwitterAPIIsAvailable ¶
func TwitterAPIIsAvailable(twitterAPI *core.TwitterAPI) error
TwitterAPIIsAvailable returns nil if twitterAPI client is available to use, which means that twitterAPI's methods are callable and it is verified by a valid credential.
Types ¶
type BatchRunner ¶
type BatchRunner interface { Run() ([]interface{}, []data.Action, error) // IsAvailable returns true if this runner is available. // You should check the availability by calling this and if this // returns false, you can't call Run. IsAvailable() error }
BatchRunner wraps a batch process and provides a feature to run it.
type BatchRunnerUsedWithStream ¶
type BatchRunnerUsedWithStream struct {
// contains filtered or unexported fields
}
BatchRunnerUsedWithStream implements mybot batch processing and is intended to be used with stream processing.
func NewBatchRunnerUsedWithStream ¶
func NewBatchRunnerUsedWithStream( twitterAPI *core.TwitterAPI, slackAPI *core.SlackAPI, visionAPI core.VisionMatcher, languageAPI core.LanguageMatcher, config core.Config, ) *BatchRunnerUsedWithStream
NewBatchRunnerUsedWithStream returns new BatchRunnerUsedWithStream with specified arguments.
func (BatchRunnerUsedWithStream) IsAvailable ¶
func (r BatchRunnerUsedWithStream) IsAvailable() error
IsAvailable returns true if Twitter API is available because it is data fetcher and all other API depends on it. It is the responsibility of Twitter API to check other APIs are available.