Documentation
¶
Index ¶
Constants ¶
const ( InternalLabelHostArchitecture string = "host-architecture" InternalLabelOperatingSystem string = "host-operating-system" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CompoundGrapher ¶ added in v0.15.0
type CompoundGrapher struct {
Graphers []Grapher
}
CompoundGrapher creates a graph from one or more Grapher simultaneously.
type ContinuousGrapher ¶ added in v0.18.0
type ContinuousGrapher interface {
// Graph graphs all images found on the platform.
// The graph is published on the channel returned by Graphs.
// The graph's roots are [ImageNode]s.
Graph(context.Context) error
// Graphs returns a channel which will receive a graph of all images found on
// the platform whenever the graph changes.
// The graph's roots are [ImageNode]s.
Graphs() <-chan Graph
// Close closes the grapher.
Close() error
}
Grapher provides asynchronous updates of graphs of resources in a platform.
type Grapher ¶
type Grapher interface {
// Graph graphs all images found on the platform.
// The graph's roots are [ImageNode]s.
Graph(context.Context) (Graph, error)
}
Grapher provides graphs of resources in a platform.
type ImageNode ¶
ImageNode represents a resource common to all platforms - the OCI image.
func (ImageNode) InternalLabels ¶ added in v0.20.0
func (n ImageNode) InternalLabels() InternalLabels
InternalLabels implements Node.
type InternalLabels ¶ added in v0.20.0
InternalLabels holds labels maintained by Cupdate for use by Cupdate.
func (InternalLabels) InternalCupdateArchitecture ¶ added in v0.20.0
func (l InternalLabels) InternalCupdateArchitecture() string
func (InternalLabels) InternalCupdateOperatingSystem ¶ added in v0.20.0
func (l InternalLabels) InternalCupdateOperatingSystem() string
type Labels ¶ added in v0.17.0
Labels holds labels / annotations found by platform implementations, which map to things like Docker labels or Kubernetes resource annotations.
func (Labels) Ignore ¶ added in v0.17.0
Ignore returns true if the Cupdate ignore label is set to true.
func (Labels) RemoveUnsupported ¶ added in v0.18.0
RemoveUnsupported removes unsupported labels.
func (Labels) StayBelow ¶ added in v0.23.0
StayBelow returns the a semver if the Cupdate stay-below label is set. Returns an error if the value is set, but invalid.
func (Labels) StayOnCurrentMajor ¶ added in v0.18.0
StayOnCurrentMajor returns true if the Cupdate stay-on-current-major label is set to true.
type Node ¶
type Node interface {
// ID implements [graph.Node].
ID() string
// Type returns a type uniquely describing the node.
Type() string
// Labels returns labels set on the resource represented by the node.
Labels() Labels
// InternalLabels returns labels set by Cupdate.
InternalLabels() InternalLabels
}
Node is a platform resource represented as a graph node.
type PollGrapher ¶
type PollGrapher struct {
// contains filtered or unexported fields
}
PollGrapher is a ContinuousGrapher implementation which polls an underlying Grapher implementation.
func NewPollGrapher ¶ added in v0.23.0
func NewPollGrapher(grapher Grapher, interval time.Duration) *PollGrapher
func (*PollGrapher) Close ¶ added in v0.23.0
func (g *PollGrapher) Close() error
func (*PollGrapher) Graph ¶ added in v0.23.0
func (g *PollGrapher) Graph(ctx context.Context) error
Graph implements ContinuousGrapher.
func (*PollGrapher) Graphs ¶ added in v0.23.0
func (g *PollGrapher) Graphs() <-chan Graph
Graphs implements ContinuousGrapher.