Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CronTrigger ¶
type CronTrigger interface { Add(format string, ch chan<- time.Time) (interface{}, error) Remove(interface{}) error }
CronTrigger add and remove the cron job by trigger function, the CronTrigger is a resource for trigger.
type HttpTrigger ¶
type HttpTrigger interface { AddRoute(path string, handler func(w http.ResponseWriter, r *http.Request)) error RemoveRoute(path string) error }
HttpTrigger add and remove the http handler by trigger function, the HttpTrigger is a resource for trigger.
type LabelManger ¶
LabelManager manage some labels for driver and function, the LabelManager is a resource.
type OutPrettyPrinter ¶
type Resources ¶
type Resources struct { Logwriter io.Writer CronTrigger CronTrigger HttpTrigger HttpTrigger OutputParser TableOperation Labels LabelManger }
Resources contains some services that can be used by the driver and function. e.g. logset service, cron service, httpserver service etc.
type TableOperation ¶
type TableOperation interface { Insert(ctx context.Context, columns []string, values ...any) error Delete(ctx context.Context, where string) error Query(ctx context.Context, columns []string, where string) ([][]string, error) }
TableOperation is the interface for db table's insert, delete and query.
Click to show internal directories.
Click to hide internal directories.