@zombiec0rn/zombie-service-diff
Zombie Service (format) differ
Last updated 4 years ago by asbjornenge .
BSD · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @zombiec0rn/zombie-service-diff 
SYNC missed versions from official npm registry.

Zombie Service Diff

Diff two zombie service states.

It takes a current and a wanted state and returns an object containing add, remove and keep properties.

Install

npm install --save @zombiec0rn/zombie-service-diff

Use

require('@zombiec0rn/zombie-service-diff')(current, wanted)
// => { add : [], remove : [], keep : [] }

Fingerprint

It can on some engines be quite hard to extract the exact configuration used to start a service. Because of this we support a fingerprint property on services being diffed, that will take precedence over the object hash.

  {
    "id": "yolo",
    "image": "zombiec0rn/yolo:1.0.0",
    "fingerprint": "0c0d289f8743bac4719509a04261c3f2d359a58d"
  }

The module also exports a fingerprint function that can be used to create the fingerprint.

require('@zombiec0rn/zombie-service-diff').fingerprint({
  id: 'yolo',
  image: 'zombiec0rn/yolo:1.0.0'
})
// => 0c0d289f8743bac4719509a04261c3f2d359a58d 

Changelog

2.0.0

  • Support for the fingerprint property

1.0.0

  • Initial release

Current Tags

  • 2.0.0                                ...           latest (4 years ago)

3 Versions

  • 2.0.0                                ...           4 years ago
  • 1.0.1                                ...           4 years ago
  • 1.0.0                                ...           4 years ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 1
Last Month 2
Dev Dependencies (1)

Copyright 2014 - 2017 © taobao.org |