bee

package
v0.0.0-...-6333696 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2020 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxIdleConnections int = 20
	RequestTimeout     int = 1

	ChunkUploadDownloadUrl = "/chunks/"
	BytesUploadDownloadUrl = "/bytes"

	SwarmPinHeader     = "Swarm-Pin"
	SwarmEncryptHeader = "Swarm-Encrypt"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BeeClient

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

func NewBeeClient

func NewBeeClient(host, port string, logger logging.Logger) *BeeClient

func (*BeeClient) CheckConnection

func (s *BeeClient) CheckConnection() bool

func (*BeeClient) DownloadBlob

func (s *BeeClient) DownloadBlob(address []byte) ([]byte, int, error)

func (*BeeClient) DownloadChunk

func (s *BeeClient) DownloadChunk(ctx context.Context, address []byte) (data []byte, err error)

download a chunk from bee

func (*BeeClient) UnpinBlob

func (s *BeeClient) UnpinBlob(ref utils.Reference) error

func (*BeeClient) UnpinChunk

func (s *BeeClient) UnpinChunk(ref utils.Reference) error

func (*BeeClient) UploadBlob

func (s *BeeClient) UploadBlob(data []byte, pin bool, encrypt bool) (address []byte, err error)

upload a chunk in bee

func (*BeeClient) UploadChunk

func (s *BeeClient) UploadChunk(ch swarm.Chunk, pin bool) (address []byte, err error)

upload a chunk in bee

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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