Add Time Trigger API and client (#153) (#161)

This change adds a timer trigger API, client, and implementation.  Users can trigger a function with a cron-compatible string. 

This change also moves the publisher interface and webhook-based publisher implementation out of kubewatcher and into a separate `publisher` package.
This commit is contained in:
yang qf
2017-05-17 15:13:56 -07:00
committed by Soam Vasani
parent e5f5050ea6
commit a8c6347ed0
20 changed files with 892 additions and 45 deletions
+3 -3
View File
@@ -23,6 +23,7 @@ import (
"k8s.io/client-go/1.5/rest"
"github.com/fission/fission/controller/client"
"github.com/fission/fission/publisher"
)
// Get a kubernetes client using the pod's service account.
@@ -49,11 +50,10 @@ func Start(controllerUrl string, routerUrl string) error {
if err != nil {
return err
}
poster := MakeWebhookPublisher(routerUrl)
poster := publisher.MakeWebhookPublisher(routerUrl)
kubeWatch := MakeKubeWatcher(kubeClient, poster)
client := client.MakeClient(controllerUrl)
MakeWatchSync(client, kubeWatch)
MakeWatchSync(client.MakeClient(controllerUrl), kubeWatch)
return nil
}