util

package
v0.2.0-rc4 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2021 License: Apache-2.0 Imports: 10 Imported by: 23

Documentation

Index

Constants

View Source
const (
	RemovedDataVolumesAnnotationKey = prefix + "/removedDataVolumes"
	AnnotationMigrationTarget       = prefix + "/migrationTargetNodeName"
	AnnotationMigrationUID          = prefix + "/migrationUID"
	AnnotationMigrationState        = prefix + "/migrationState"
	AnnotationTimestamp             = prefix + "/timestamp"
)

Variables

This section is empty.

Functions

func EncodePrivateKeyToPEM

func EncodePrivateKeyToPEM(privateKey *rsa.PrivateKey) []byte

EncodePrivateKeyToPEM encodes Private Key from RSA to PEM format

func GeneratePrivateKey

func GeneratePrivateKey(bitSize int) (*rsa.PrivateKey, error)

GeneratePrivateKey creates a RSA Private Key of specified byte size

func GeneratePublicKey

func GeneratePublicKey(publicKey *rsa.PublicKey) ([]byte, error)

GeneratePublicKey take a rsa.PublicKey and return bytes suitable for writing to .pub file returns in the format "ssh-rsa ..."

func VirtClientUpdateVmi

func VirtClientUpdateVmi(ctx context.Context, client rest.Interface, managementNamespace, namespace, name string, obj runtime.Object) error

Types

type CountingReader

type CountingReader struct {
	Reader  io.ReadCloser
	Current int64
	// Total can be negative meaning the total size is unknown
	Total int64
	Done  bool
}

CountingReader is a reader that keeps track of how much has been read

func (*CountingReader) Close

func (r *CountingReader) Close() error

Close closes the stream

func (*CountingReader) Read

func (r *CountingReader) Read(p []byte) (n int, err error)

Read reads bytes from the stream and updates the prometheus clone_progress metric according to the progress.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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