datapeer

package
v0.19.4 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2017 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeIpfsWebService

func MakeIpfsWebService(options IpfsWebServiceOptions) api.DataPeer

func MakeResidentMemoryDataPeer

func MakeResidentMemoryDataPeer(options ResidentMemoryStorageOptions) api.DataPeer

func MakeResidentMemoryPubSubBus

func MakeResidentMemoryPubSubBus() api.PubSubber

Types

type IpfsWebServiceOptions

type IpfsWebServiceOptions struct {
	Url         string
	Http        *gohttp.Client
	PingTimeout time.Duration
	Shell       *ipfs.Shell
}

type ResidentMemoryStorageOptions

type ResidentMemoryStorageOptions struct {
	Hash crypto.Hash
}

type Union

type Union struct {
	Storage      api.ContentAddressableStorage
	Publisher    api.PubSubPublisher
	Subscriber   api.PubSubSubscriber
	Connecter    api.ConnectablePeer
	Disconnecter api.DisconnectablePeer
	Pinger       api.PingablePeer
}

func (Union) Add

func (peer Union) Add(r io.Reader) (string, error)

func (Union) Cat

func (peer Union) Cat(path string) (io.ReadCloser, error)

func (Union) Connect

func (peer Union) Connect() error

func (Union) Disconnect

func (peer Union) Disconnect() error

func (Union) IsUp

func (peer Union) IsUp() bool

func (Union) PubSubPublish

func (peer Union) PubSubPublish(topic, data string) error

func (Union) PubSubSubscribe

func (peer Union) PubSubSubscribe(topic string) (api.PubSubSubscription, error)

Jump to

Keyboard shortcuts

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