random

package
v0.0.0-...-14de809 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package random provides a facility for synthesizing pseudo-random images.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Image

func Image(byteSize, layers int64, options ...Option) (v1.Image, error)

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

func Layer(byteSize int64, mt types.MediaType, options ...Option) (v1.Layer, error)

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

func WithSource(source rand.Source) Option

WithSource sets the random number generator source

Jump to

Keyboard shortcuts

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