8000 ctr: add commands package with shared utility functions by jessvalarezo · Pull Request #1679 · containerd/containerd · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

ctr: add commands package with shared utility functions #1679

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 24, 2017

Conversation

jessvalarezo
Copy link
Contributor

This PR is the first pass in restructuring ctr. It moves some shared functions from ctr/utils.go to ctr/commands/commands.go. If this is the direction that we would like to move in I'll continue to move over more shared functions, then start separating out the commands.

Background
The end goal is for ctr to have some support, and for commands to be consistent and scoped.

Proposed file structure:

  • /ctr/commands/ for utility functions shared amongst various commands

and a package per command (ctr snapshot ... ctr images ...``ctr containers...):

  • /ctr/commands/snapshot
  • /ctr/commands/images
  • /ctr/commands/containers
  • /ctr/commands/events
  • /ctr/commands/namespaces
  • /ctr/commands/content
  • /ctr/commands/tasks

Signed-off-by: Jess Valarezo valarezo.jessica@gmail.com

Signed-off-by: Jess Valarezo <valarezo.jessica@gmail.com>
@codecov-io
Copy link

Codecov Report

Merging #1679 into master will decrease coverage by 0.17%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1679      +/-   ##
==========================================
- Coverage   48.92%   48.74%   -0.18%     
==========================================
  Files          27       27              
  Lines        4076     4076              
==========================================
- Hits         1994     1987       -7     
- Misses       1667     1669       +2     
- Partials      415      420       +5
Impacted Files Coverage Δ
metadata/db.go 64% <0%> (-3%) ⬇️
metadata/snapshot.go 49.34% <0%> (-0.94%) ⬇️
metadata/content.go 31.57% <0%> (+0.95%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 04659d9...a19a203. Read the comment docs.

@crosbymichael
Copy link
Member

LGTM

1 similar comment
@dmcgowan
Copy link
Member

LGTM

@dmcgowan dmcgowan merged commit 80de000 into containerd:master Oct 24, 2017
@jessvalarezo jessvalarezo deleted the ctr-refactor-first-pass branch October 24, 2017 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0