chunkutil

package
v0.0.0-...-cffa139 Latest Latest
Warning

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

Go to latest
Published: May 29, 2015 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package chunkutil contains helper functions only needed by chunks.Store implementations. Users of a Store don't need this package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleGet

func HandleGet(fn Handler, key cas.Key, typ string, level uint8) (*chunks.Chunk, error)

func Hash

func Hash(chunk *chunks.Chunk) cas.Key

Hash hashes the data in a chunk into a cas.Key.

Hash makes sure to never return a Special Key.

func MakeChunk

func MakeChunk(typ string, level uint8, data []byte) *chunks.Chunk

MakeChunk makes a new Chunk of the given description, filling it with content from data.

Types

type Handler

type Handler func(key cas.Key, typ string, level uint8) ([]byte, error)

Jump to

Keyboard shortcuts

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