platform

package
v0.17.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 14, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

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.

func (*CompoundGrapher) Graph added in v0.15.0

func (g *CompoundGrapher) Graph(ctx context.Context) (Graph, error)

type ContinousGrapher

type ContinousGrapher interface {
	// GraphContinously 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.
	GraphContinously(context.Context) (<-chan Graph, error)
}

type Graph

type Graph = *graph.Graph[Node]

func NewGraph

func NewGraph() Graph

type Grapher

type Grapher interface {
	// Graph returns a graph of all images found on the platform.
	// The graph's roots are [ImageNode]s.
	Graph(context.Context) (Graph, error)
}

type ImageNode

type ImageNode struct {
	Reference oci.Reference
}

func (ImageNode) ID

func (n ImageNode) ID() string

func (ImageNode) Labels added in v0.17.0

func (n ImageNode) Labels() Labels

func (ImageNode) String

func (n ImageNode) String() string

func (ImageNode) Type

func (n ImageNode) Type() string

type Labels added in v0.17.0

type Labels map[string]string

func (Labels) Ignore added in v0.17.0

func (l Labels) Ignore() bool

type Node

type Node interface {
	ID() string
	Type() string
	Labels() Labels
}

type PollGrapher

type PollGrapher struct {
	Grapher  Grapher
	Interval time.Duration
}

func (*PollGrapher) GraphContinously

func (g *PollGrapher) GraphContinously(ctx context.Context) (<-chan Graph, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL