package random
import "github.com/google/go-containerregistry/pkg/v1/random"
Package random provides a facility for synthesizing pseudo-random images.
Index ¶
- func Image(byteSize, layers int64, options ...Option) (v1.Image, error)
- func Index(byteSize, layers, count int64, options ...Option) (v1.ImageIndex, error)
- func Layer(byteSize int64, mt types.MediaType, options ...Option) (v1.Layer, error)
- type Option
Functions ¶
func Image ¶
Image returns a pseudo-randomly generated Image.
func Index ¶
func Index(byteSize, layers, count int64, options ...Option) (v1.ImageIndex, error)
Index returns a pseudo-randomly generated ImageIndex with count images, each having the given number of layers of size byteSize.
func Layer ¶
Layer returns a layer with pseudo-randomly generated content.
Types ¶
type Option ¶
type Option func(opts *options)
Option is an optional parameter to the random functions
func WithSource ¶
WithSource sets the random number generator source
Source Files ¶
doc.go image.go index.go options.go
- Version
- v0.20.3 (latest)
- Published
- Jan 15, 2025
- Platform
- linux/amd64
- Imports
- 13 packages
- Last checked
- 16 hours ago –
Tools for package owners.