Skip to content

Commit d206896

Browse files
committed
content: add InfoProvider interface
Signed-off-by: Derek McGowan <[email protected]> (cherry picked from commit f8c789f) Signed-off-by: Derek McGowan <[email protected]>
1 parent f0d3109 commit d206896

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
@@ -87,9 +87,6 @@ type IngestManager interface {
8787
}
8888

8989
// Info holds content specific information
90-
//
91-
// TODO(stevvooe): Consider a very different name for this struct. Info is way
92-
// to general. It also reads very weird in certain context, like pluralization.
9390
type Info struct {
9491
Digest digest.Digest
9592
Size int64
@@ -111,12 +108,17 @@ type Status struct {
111108
// WalkFunc defines the callback for a blob walk.
112109
type WalkFunc func(Info) error
113110

114-
// Manager provides methods for inspecting, listing and removing content.
115-
type Manager interface {
111+
// InfoProvider provides info for content inspection.
112+
type InfoProvider interface {
116113
// Info will return metadata about content available in the content store.
117114
//
118115
// If the content is not present, ErrNotFound will be returned.
119116
Info(ctx context.Context, dgst digest.Digest) (Info, error)
117+
}
118+
119+
// Manager provides methods for inspecting, listing and removing content.
120+
type Manager interface {
121+
InfoProvider
120122

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

0 commit comments

Comments
 (0)