analyzer

package
v0.15.1 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2023 License: Apache-2.0 Imports: 28 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Analyze

func Analyze(ctx context.Context, client *containerd.Client, ref string, opts ...Option) (digest.Digest, error)

Analyze analyzes the passed image then store the record of prioritized files into containerd's content store. This function returns the digest of that record file. This digest can be used to read record from the content store.

Types

type Option

type Option func(opts *analyzerOpts)

Option is runtime configuration of analyzer container

func WithPeriod

func WithPeriod(period time.Duration) Option

WithPeriod is the period to run runtime

func WithSnapshotter

func WithSnapshotter(snapshotter string) Option

WithSnapshotter is the snapshotter to use

func WithSpecOpts

func WithSpecOpts(specOpts SpecOpts) Option

WithSpecOpts is the runtime configuration

func WithStdin

func WithStdin() Option

WithStdin attaches stdin to the container

func WithTerminal

func WithTerminal() Option

WithTerminal enable terminal for the container. This must be specified with WithStdin().

func WithWaitLineOut added in v0.12.1

func WithWaitLineOut(s string) Option

WithWaitLineOut specifies a substring of a stdout line to be waited. When this line is detected, the container will be killed.

func WithWaitOnSignal

func WithWaitOnSignal() Option

WithWaitOnSignal disables timeout

type SpecOpts

type SpecOpts func(image containerd.Image, rootfs string) (opts []oci.SpecOpts, done func() error, err error)

SpecOpts returns runtime configuration based on the passed image and rootfs path.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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