swarm

package
v1.5.8 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2017 License: GPL-3.0 Imports: 19 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Info

type Info struct {
	*api.Config
	*chequebook.Params
}

serialisable info about swarm

func (*Info) Info

func (self *Info) Info() *Info

type Swarm

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

the swarm stack

func NewLocalSwarm

func NewLocalSwarm(datadir, port string) (self *Swarm, err error)

Local swarm without netStore

func NewSwarm

func NewSwarm(ctx *node.ServiceContext, backend chequebook.Backend, config *api.Config, swapEnabled, syncEnabled bool, cors string) (self *Swarm, err error)

creates a new swarm service instance implements node.Service

func (*Swarm) API

func (self *Swarm) API() *SwarmAPI

func (*Swarm) APIs

func (self *Swarm) APIs() []rpc.API

implements node.Service Apis returns the RPC Api descriptors the Swarm implementation offers

func (*Swarm) Api

func (self *Swarm) Api() *api.Api

func (*Swarm) Protocols

func (self *Swarm) Protocols() []p2p.Protocol

implements the node.Service interface

func (*Swarm) SetChequebook

func (self *Swarm) SetChequebook(ctx context.Context) error

SetChequebook ensures that the local checquebook is set up on chain.

func (*Swarm) Start

func (self *Swarm) Start(net *p2p.Server) error

Start is called when the stack is started * starts the network kademlia hive peer management * (starts netStore level 0 api) * starts DPA level 1 api (chunking -> store/retrieve requests) * (starts level 2 api) * starts http proxy server * registers url scheme handlers for bzz, etc * TODO: start subservices like sword, swear, swarmdns

implements the node.Service interface

func (*Swarm) Stop

func (self *Swarm) Stop() error

implements the node.Service interface stops all component services.

type SwarmAPI

type SwarmAPI struct {
	Api     *api.Api
	Backend chequebook.Backend
	PrvKey  *ecdsa.PrivateKey
}

Directories

Path Synopsis
api
http
A simple http server interface to Swarm
A simple http server interface to Swarm
services

Jump to

Keyboard shortcuts

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