Skip to content

Commit

Permalink
Merge pull request containers#321 from rhatdan/deprecated
Browse files Browse the repository at this point in the history
 Deprecate atomic transport
  • Loading branch information
mtrmac authored Aug 2, 2017
2 parents 7b32f85 + c21049e commit 6d101c8
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions transports/transports.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,19 @@ func ImageName(ref types.ImageReference) string {
return ref.Transport().Name() + ":" + ref.StringWithinTransport()
}

// ListNames returns a list of transport names
// ListNames returns a list of non deprecated transport names.
// Deprecated transports can be used, but are not presented to users.
func ListNames() []string {
kt.mu.Lock()
defer kt.mu.Unlock()
deprecated := map[string]bool{
"atomic": true,
}
var names []string
for _, transport := range kt.transports {
names = append(names, transport.Name())
if !deprecated[transport.Name()] {
names = append(names, transport.Name())
}
}
sort.Strings(names)
return names
Expand Down

0 comments on commit 6d101c8

Please sign in to comment.