tree

package
v0.0.0-...-6b14619 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2014 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTree

func NewTree(m *libtorrent.Metainfo, config interface{}) (libtorrent.Store, error)

Types

type Config

type Config struct {
	NodeFactory NodeFactory
}

type DiskNode

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

func (*DiskNode) Length

func (d *DiskNode) Length() int64

func (*DiskNode) ReadAt

func (d *DiskNode) ReadAt(p []byte, off int64) (n int, err error)

func (*DiskNode) String

func (d *DiskNode) String() string

func (*DiskNode) WriteAt

func (d *DiskNode) WriteAt(p []byte, off int64) (n int, err error)

type DiskNodeConfig

type DiskNodeConfig struct {
	Base string
}

type Node

type Node interface {
	io.ReaderAt
	io.WriterAt
	Length() int64
}

func NewDiskNode

func NewDiskNode(name string, length int64, config interface{}) (Node, error)

type NodeConstructor

type NodeConstructor func(name string, length int64, config interface{}) (Node, error)

type NodeFactory

type NodeFactory struct {
	Constructor NodeConstructor
	Config      interface{}
}

type Tree

type Tree struct {
	*libtorrent.BaseStore
	// contains filtered or unexported fields
}

func (*Tree) GetBlock

func (s *Tree) GetBlock(index int, offset int64, block []byte) (int, error)

func (*Tree) SetBlock

func (s *Tree) SetBlock(index int, offset int64, block []byte) (int, error)

Jump to

Keyboard shortcuts

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