cas

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2021 License: Apache-2.0 Imports: 4 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 implements client for accessing the underlying content addressable storage

func New

func New(dcasClient client.DCAS) *Client

New returns a new CAS client

func (*Client) Read

func (c *Client) Read(address string) ([]byte, error)

Read reads the content at the given address from content addressable storage returns the content of the given address.

func (*Client) Write

func (c *Client) Write(content []byte) (string, error)

Write writes the given content to content addressable storage returns the content ID (CID) of the content.

Jump to

Keyboard shortcuts

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