Skip to content

Commit b4dcffc

Browse files
dmcgowanvvoland
authored andcommitted
content: add InfoProvider interface
Signed-off-by: Derek McGowan <derek@mcg.dev> (cherry picked from commit f8c789f) Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
1 parent bef4145 commit b4dcffc

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

content/content.go

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,6 @@ type Ingester interface {
4747
}
4848

4949
// Info holds content specific information
50-
//
51-
// TODO(stevvooe): Consider a very different name for this struct. Info is way
52-
// to general. It also reads very weird in certain context, like pluralization.
5350
type Info struct {
5451
Digest digest.Digest
5552
Size int64
@@ -71,12 +68,17 @@ type Status struct {
7168
// WalkFunc defines the callback for a blob walk.
7269
type WalkFunc func(Info) error
7370

74-
// Manager provides methods for inspecting, listing and removing content.
75-
type Manager interface {
71+
// InfoProvider provides info for content inspection.
72+
type InfoProvider interface {
7673
// Info will return metadata about content available in the content store.
7774
//
7875
// If the content is not present, ErrNotFound will be returned.
7976
Info(ctx context.Context, dgst digest.Digest) (Info, error)
77+
}
78+
79+
// Manager provides methods for inspecting, listing and removing content.
80+
type Manager interface {
81+
InfoProvider
8082

8183
// Update updates mutable information related to content.
8284
// If one or more fieldpaths are provided, only those

0 commit comments

Comments
 (0)