()
| 41 | } |
| 42 | |
| 43 | func (n *progressNode) mainDesc() *ocispec.Descriptor { |
| 44 | if n.Desc != nil { |
| 45 | return n.Desc |
| 46 | } |
| 47 | for _, c := range n.children { |
| 48 | if desc := c.mainDesc(); desc != nil { |
| 49 | return desc |
| 50 | } |
| 51 | } |
| 52 | return nil |
| 53 | } |
| 54 | |
| 55 | // ProgressHandler returns a progress callback and a cleanup function to render transfer progress. |
| 56 | // This implementation is based on containerd's ctr command progress handler. |