checkpoint

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2022 License: CC-BY-4.0 Imports: 6 Imported by: 0

Documentation

Overview

Copyright (C) Microsoft Corporation. All rights reserved. Licensed under the MIT License. See LICENSE-CODE in the project root for license information.

Copyright (C) Microsoft Corporation. All rights reserved. Licensed under the MIT License. See LICENSE-CODE in the project root for license information.

Copyright (C) Microsoft Corporation. All rights reserved. Licensed under the MIT License. See LICENSE-CODE in the project root for license information. Package checkpoint implements the structures, methods, and functions used by the Checkpoint utilities

Index

Constants

View Source
const (
	KB = 1024
	MB = KB * KB
	GB = MB * KB
)

Variables

This section is empty.

Functions

func GenerateCheckpointName

func GenerateCheckpointName(uniqueName string, frameName string) string

GenerateCheckpointName generates a checkpoint name from unique name and frame name

func GetCheckpointName

func GetCheckpointName(fullFilePath string) string

GetCheckpointName returns the checkpoint name, which is just the parent directory

func GetCheckpointNameParts

func GetCheckpointNameParts(fullFilePath string) (string, string)

GetCheckpointNameParts generates the parts of the batch name

func GetName

func GetName(fullFilePath string) string

return the filename

Types

type CheckpointFile

type CheckpointFile struct {
	Name    string
	Payload []byte
}

CheckpointFile represents a checkpoint file

func InitializeCheckpointFile

func InitializeCheckpointFile(name string) *CheckpointFile

InitializeCheckpointFile sets the unique name of the job configuration and the batch name

func ReadCheckpointFile

func ReadCheckpointFile(reader *file.ReaderWriter, filename string) (*CheckpointFile, error)

ReadCheckpointFile reads a job config file from disk

func (*CheckpointFile) WriteCheckpointFile

func (c *CheckpointFile) WriteCheckpointFile(writer *file.ReaderWriter, filepath string, fileSizeBytes int) (string, error)

WriteJobConfigFile writes the job configuration file to disk, padding it so it makes the necessary size

Jump to

Keyboard shortcuts

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