snapshotter

package
v3.26.0 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package snapshotter provides the core snapshotter structs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	DataDir string        `toml:"data-dir"`
	Logger  logger.Logger `toml:"-"`
}

type Snapshotter

type Snapshotter struct {
	// contains filtered or unexported fields
}

func New

func New(cfg Config) *Snapshotter

func (*Snapshotter) Read

func (s *Snapshotter) Read(bucket string, key string, version int) (io.ReadCloser, error)

func (*Snapshotter) SetLogger

func (s *Snapshotter) SetLogger(l logger.Logger)

SetLogger sets the logger used for logging messages.

func (*Snapshotter) Write

func (s *Snapshotter) Write(bucket string, key string, version int, rc io.ReadCloser) error

func (*Snapshotter) WriteTo

func (s *Snapshotter) WriteTo(bucket string, key string, version int, wrTo io.WriterTo) error

WriteTo is exactly the same as Write, except that it takes an io.WriteTo instead of an io.ReadCloser. This needs to be cleaned up so that we're only using one or the other.

Directories

Path Synopsis
Package client contains an http implementation of the WriteLogger client.
Package client contains an http implementation of the WriteLogger client.

Jump to

Keyboard shortcuts

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