Categorygithub.com/containerd/continuity
modulepackage
0.4.5
Repository: https://github.com/containerd/continuity.git
Documentation: pkg.go.dev

# README

continuity

Go Reference Build Status

A transport-agnostic, filesystem metadata manifest system

This project is a staging area for experiments in providing transport agnostic metadata storage.

See opencontainers/runtime-spec#11 for more details.

Manifest Format

A continuity manifest encodes filesystem metadata in Protocol Buffers. Refer to proto/manifest.proto for more details.

Usage

Build:

$ make

Create a manifest (of this repo itself):

$ ./bin/continuity build . > /tmp/a.pb

Dump a manifest:

$ ./bin/continuity ls /tmp/a.pb
...
-rw-rw-r--      270 B   /.gitignore
-rw-rw-r--      88 B    /.mailmap
-rw-rw-r--      187 B   /.travis.yml
-rw-rw-r--      359 B   /AUTHORS
-rw-rw-r--      11 kB   /LICENSE
-rw-rw-r--      1.5 kB  /Makefile
...
-rw-rw-r--      986 B   /testutil_test.go
drwxrwxr-x      0 B     /version
-rw-rw-r--      478 B   /version/version.go

Verify a manifest:

$ ./bin/continuity verify . /tmp/a.pb

Break the directory and restore using the manifest:

$ chmod 777 Makefile
$ ./bin/continuity verify . /tmp/a.pb
2017/06/23 08:00:34 error verifying manifest: resource "/Makefile" has incorrect mode: -rwxrwxrwx != -rw-rw-r--
$ ./bin/continuity apply . /tmp/a.pb
$ stat -c %a Makefile
664
$ ./bin/continuity verify . /tmp/a.pb

Platforms

continuity primarily targets Linux. Continuity may compile for and work on other operating systems, but those platforms are not tested.

Contribution Guide

Building Proto Package

If you change the proto file you will need to rebuild the generated Go with go generate.

$ go generate ./proto

Project details

continuity is a containerd sub-project, licensed under the Apache 2.0 license. As a containerd sub-project, you will find the:

information in our containerd/project repository.

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Functions

ApplyManifest applies on the resources in a manifest to the given context.
AtomicWriteFile atomically writes data to a file by first writing to a temp file and calling rename.
BuildManifest creates the manifest for the given context.
No description provided by the author
No description provided by the author
Merge two or more Resources into new file.
NewContext returns a Context associated with root.
NewContextWithOptions returns a Context associate with the root.
No description provided by the author
VerifyManifest verifies all the resources in a manifest against files from the given context.

# Variables

ErrNotFound represents the resource not found.
ErrNotSupported represents the resource not supported.

# Structs

ContextOptions represents options to create a new context.
Manifest provides the contents of a manifest.

# Interfaces

ContentProvider produces a read stream for a given digest.
Context represents a file system context for accessing resources.
No description provided by the author
Digester produces a digest for a given read stream.
No description provided by the author
Hardlinkable is an interface that a resource type satisfies if it can be a hardlink target.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Type aliases

ByPath provides the canonical sort order for a set of resources.
SymlinkPath is intended to give the symlink target value in a root context.