swarm

package
v2.1.73+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2018 License: GPL-3.0 Imports: 19 Imported by: 0

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 (i *Info) Info() *Info

type Swarm

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

the swarm stack

func NewSwarm

func NewSwarm(backend chequebook.Backend, ensClient *goclient.Client, 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 (s *Swarm) API() *SwarmAPI

func (*Swarm) APIs

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

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

func (*Swarm) Api

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

func (*Swarm) Protocols

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

implements the node.Service interface

func (*Swarm) SetChequebook

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

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

func (*Swarm) Start

func (s *Swarm) Start(srv *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 (s *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
Show nicely (but simple) formatted HTML error pages (or respond with JSON if the appropriate `Accept` header is set)) for the http package.
Show nicely (but simple) formatted HTML error pages (or respond with JSON if the appropriate `Accept` header is set)) for the http package.
services

Jump to

Keyboard shortcuts

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