Add Parser interface 12/162012/3
authorLukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Wed, 22 Nov 2017 16:39:51 +0000 (17:39 +0100)
committerLukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Mon, 4 Dec 2017 08:19:11 +0000 (09:19 +0100)
Parser defines action run for a Job to prepare config in parsing phase.

Change-Id: Iea53d08c89d5fbedf690036688ded53c40349741
Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
controller/parser.go [new file with mode: 0644]

diff --git a/controller/parser.go b/controller/parser.go
new file mode 100644 (file)
index 0000000..22d15f3
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+ *  Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License
+ */
+
+// File controller/parser.go defines interface for delegating parsing Job's
+// yaml file and preparation of Job's config.
+
+package controller
+
+import (
+       "git.tizen.org/tools/weles"
+       "git.tizen.org/tools/weles/controller/notifier"
+)
+
+// Parser defines action run for a Job to prepare config in parsing phase.
+type Parser interface {
+       notifier.Notifier
+       // Parse prepares Job's config.
+       Parse(weles.JobID)
+}