offline

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2023 License: Apache-2.0, MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client is an offline client that can be used to fetch and push objects on the local filesystem. This is fast network bypass method for processes on the same host.

func NewClient

func NewClient(store storage.Storage) *Client

NewClient creates a new offline client.

func (*Client) Fetch

func (c *Client) Fetch(id contenthash.Hash) (io.ReadCloser, error)

Fetch fetches an object from the local filesystem store.

func (*Client) Push

func (c *Client) Push(src io.Reader, opts *PushOpts) (*pb.ObjectManifest, error)

Push pushes an object to the local filesystem store.

type PushOpts

type PushOpts struct {
	// ChunkSize is the nominal size of each chunk.
	ChunkSize int64
}

PushOpts is used to configure the behaviour of pushing an object.

Jump to

Keyboard shortcuts

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