• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

kedgeproject / kedge / 370
40%

Build:
DEFAULT BRANCH: master
Ran 04 Sep 2017 04:28AM UTC
Jobs 2
Files 13
Run time 5s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
370

Pull #236

travis-ci

web-flow
introduce controller interface

This commit introduces a ControllerInterface interface which
every controller added to Kedge has to implement.

In the current code, we have only the Deployment controller and
hence the DeploymentSpecMod definition in Kedge spec has to
implement this interface.

The ControllerInterface interface has 4 methods inside it, namely
Unmarshal, Validate, Fix and Transform; and this commit refactors
such that every controller has a new file per method. Based on the
current code, this means that the following 4 files have been
added -
pkg/spec/deployment_fix.go        pkg/spec/deployment_unmarshal.go
pkg/spec/deployment_transform.go  pkg/spec/deployment_validate.go

These files have the code pertaining to each method of the
interface each implements.

This separation based on files has removed the need for older
file structure, hence the files -
pkg/encoding/encoding.go
pkg/spec/fix.go
pkg/spec/kubernetes.go
pkg/spec/validate.go
have gone away and have been merged into the deployment_* files.

Besides this, a lot of functions have been converted to methods
applying to the Controller they pertain to.

Tests have been fixed.

Please note that a lot more refactor can be done, but that should
happen in subsequent PRs.

Merging this refactor eases the way to put in other controllers
very easily, like Kubernetes Jobs which is lined up next.
Pull Request #236: introduce controller interface

33 of 33 new or added lines in 3 files covered. (100.0%)

278 of 730 relevant lines covered (38.08%)

4.13 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
2
100.0
pkg/cmd/generate.go
2
100.0
pkg/cmd/kubernetes.go
21
100.0
pkg/spec/controller.go
Jobs
ID Job ID Ran Files Coverage
1 370.1 04 Sep 2017 04:28AM UTC 0
38.08
Travis Job 370.1
2 370.2 04 Sep 2017 04:28AM UTC 0
38.08
Travis Job 370.2
Source Files on build 370
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #370
  • Pull Request #236
  • PR Base - master (#367)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc