Watch type

Contains parameters to start a Kubernetes watch, and a function to
call when the watch triggers.
This commit is contained in:
Soam Vasani
2016-12-09 23:25:29 -08:00
parent fa093829bc
commit e49af8ca78
2 changed files with 35 additions and 0 deletions
+15
View File
@@ -53,6 +53,20 @@ type (
Function Metadata `json:"function"`
}
// Watch is a specification of Kubernetes watch along with a URL to post events to.
Watch struct {
Metadata `json:"metadata"`
Namespace string `json:"namespace"`
ObjType string `json:"objtype"`
LabelSelector string `json:"labelselector"`
FieldSelector string `json:"fieldselector"`
Function Metadata `json:"function"`
Url string `json:"url"` // POST request made to this URL.
}
// Errors returned by the Fission API.
Error struct {
Code errorCode `json:"code"`
@@ -69,4 +83,5 @@ const (
ErrorNameExists
ErrorInvalidArgument
ErrorNoSpace
ErrorNotImplmented
)