Documentation ¶
Index ¶
Constants ¶
View Source
const ( EventTypeNone = EventType("") EventTypeDescriptorMismatch = EventType("DescriptorMismatch") EventTypeIndexBlobMismatch = EventType("IndexBlobMismatch") EventTypeManifestBlobMismatch = EventType("ManifestBlobMismatch") EventTypeConfigBlobMismatch = EventType("ConfigBlobMismatch") EventTypeLayerBlobMismatch = EventType("LayerBlobMismatch") EventTypeTarEntryMismatch = EventType("TarEntryMismatch") )
View Source
const ( ReportDirReadmeMD = "README.md" ReportDirReportJSON = "report.json" ReportDirInput0 = "input-0" ReportDirInput1 = "input-1" )
View Source
const ReportDirReadmeMDContent = `` /* 145-byte string literal not displayed */
Variables ¶
View Source
var DefaultEventHandler = NewDefaultEventHandler(os.Stdout)
View Source
var ReportDirRootFilenames = []string{ ReportDirReadmeMD, ReportDirReportJSON, ReportDirInput0, ReportDirInput1, }
View Source
var VerboseEventHandler = newVerboseEventHandler()
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event struct { Type EventType `json:"type,omitempty"` Inputs [2]EventInput `json:"inputs,omitempty"` Diff string `json:"diff,omitempty"` // Not machine-parsable Note string `json:"note,omitempty"` // Not machine-parsable }
func (*Event) String ¶
String implements fmt.Stringer. The returned string is not machine-parsable.
type EventHandler ¶
type EventHandler interface {
HandleEventTreeNode(context.Context, *EventTreeNode) error
}
EventHandler handles an event. EventHandler blocks.
func NewDefaultEventHandler ¶
func NewDefaultEventHandler(w io.Writer) EventHandler
type EventInput ¶
type EventTreeNode ¶
type EventTreeNode struct { Context string `json:"context"` // Not unique Event `json:"event"` Children []*EventTreeNode `json:"children,omitempty"` sync.RWMutex `json:"-"` }
func Diff ¶
func Diff(ctx context.Context, cs content.Provider, descs [2]ocispec.Descriptor, platMC platforms.MatchComparer, opts *Options) (*EventTreeNode, error)
func (*EventTreeNode) Append ¶
func (n *EventTreeNode) Append(newNode *EventTreeNode)
type IgnoranceOptions ¶
type Options ¶
type Options struct { IgnoranceOptions EventHandler ReportFile string ReportDir string MaxScale float64 }
Click to show internal directories.
Click to hide internal directories.