snapshot

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultSnapshotChunkSize = 1024 * 1024

DefaultSnapshotChunkSize default chunk size of gRPC snapshot stream.

Variables

This section is empty.

Functions

func NewTemp

func NewTemp() (*snapshotFile, error)

func OpenFile

func OpenFile(path string) (*snapshotFile, error)

Types

type Reader

type Reader struct {
	Stream  regattapb.Snapshot_StreamClient
	Limiter *rate.Limiter
}

func (Reader) Read

func (s Reader) Read(p []byte) (int, error)

func (Reader) WriteTo

func (s Reader) WriteTo(w io.Writer) (int64, error)

type Writer

type Writer struct {
	Sender regattapb.Snapshot_StreamServer
}

func (*Writer) ReadFrom

func (g *Writer) ReadFrom(r io.Reader) (int64, error)

func (*Writer) Write

func (g *Writer) Write(p []byte) (int, error)

Jump to

Keyboard shortcuts

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