Documentation
¶
Index ¶
- type Alloc
- type Cacher
- type Clique
- type Config
- type Controller
- func (c *Controller) DataStoreAPI() core.DataStoreAPI
- func (c *Controller) GetUnixfs(ctx context.Context, urlPath string, endpoint string) (node files.Node, err error)
- func (c *Controller) HandleSwarm(info peer.AddrInfo) error
- func (c *Controller) ID(ctx context.Context) (*core.DataStoreInfo, error)
- func (c *Controller) Initialize() (e error)
- func (c *Controller) PinAdd(ctx context.Context, req *core.DataStoreReq) (*core.DataStoreResp, error)
- func (c *Controller) PinLs(ctx context.Context, req *core.DataStoreReq) (*core.DataStoreResp, error)
- func (c *Controller) Run()
- func (c *Controller) Stop() (e error)
- func (c *Controller) UploadFile(ctx context.Context, req *core.UploadReq) (*core.UploadResp, error)
- func (c Controller) WaitAllReady()
- type DataHashInfo
- type ETHPeer
- type ETHProtocol
- type ETHProtocolInfo
- type Genesis
- type JSONRPCAdapter
- type Network
- type Result
- type ServiceIndex
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cacher ¶
type Cacher interface { Load(hash string, data core.Unmarshaler) error Store(hash string, data core.Marshaler) error Update(hash string, fn func(bytes []byte) (core.Marshaler, error)) error Close() error Range(f func(hash string, value string) bool) }
Cacher ...
type Config ¶
type Config struct { ChainID int64 `json:"chainId"` HomesteadBlock int64 `json:"homesteadBlock"` Eip150Block int64 `json:"eip150Block"` Eip150Hash string `json:"eip150Hash"` Eip155Block int64 `json:"eip155Block"` Eip158Block int64 `json:"eip158Block"` ByzantiumBlock int64 `json:"byzantiumBlock"` ConstantinopleBlock int64 `json:"constantinopleBlock"` Clique Clique `json:"clique"` }
Config ...
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
Controller ...
func (*Controller) DataStoreAPI ¶
func (c *Controller) DataStoreAPI() core.DataStoreAPI
DataStoreAPI ...
func (*Controller) GetUnixfs ¶
func (c *Controller) GetUnixfs(ctx context.Context, urlPath string, endpoint string) (node files.Node, err error)
GetUnixfs ...
func (*Controller) HandleSwarm ¶
func (c *Controller) HandleSwarm(info peer.AddrInfo) error
HandleSwarm ...
func (*Controller) ID ¶
func (c *Controller) ID(ctx context.Context) (*core.DataStoreInfo, error)
ID ...
func (*Controller) PinAdd ¶
func (c *Controller) PinAdd(ctx context.Context, req *core.DataStoreReq) (*core.DataStoreResp, error)
PinAdd ...
func (*Controller) PinLs ¶
func (c *Controller) PinLs(ctx context.Context, req *core.DataStoreReq) (*core.DataStoreResp, error)
PinLs ...
func (*Controller) UploadFile ¶
func (c *Controller) UploadFile(ctx context.Context, req *core.UploadReq) (*core.UploadResp, error)
UploadFile ...
type DataHashInfo ¶
type DataHashInfo struct { DataHash string `json:"data_hash"` DataInfo core.Serializable `json:"data_info"` AddrInfo core.AddrInfo `json:"addr_info"` }
DataHashInfo ...
type ETHPeer ¶
type ETHPeer struct { Caps []string ID string Name string Enode string Network Network Protocols interface{} }
ETHPeer ...
type ETHProtocolInfo ¶
type ETHProtocolInfo struct { Difficulty int `json:"difficulty"` Head string `json:"head"` Version int `json:"version"` }
ETHProtocolInfo ...
type Genesis ¶
type Genesis struct { Config Config `json:"config"` Nonce string `json:"nonce"` Timestamp string `json:"timestamp"` ExtraData string `json:"extraData"` GasLimit string `json:"gasLimit"` Difficulty string `json:"difficulty"` MixHash string `json:"mixHash"` Coinbase string `json:"coinbase"` Alloc map[string]Alloc `json:"alloc"` Number string `json:"number"` GasUsed string `json:"gasUsed"` ParentHash string `json:"parentHash"` }
Genesis ...
type JSONRPCAdapter ¶
type JSONRPCAdapter interface { ID(r *http.Request, req *core.IDReq, resp *core.IDResp) error Add(r *http.Request, req *core.AddReq, resp *core.AddResp) error Get(r *http.Request, req *core.GetReq, resp *core.GetResp) error Pay(r *http.Request, req *core.PayReq, resp *core.PayResp) error }
JSONRPCAdapter //todo
type Network ¶
type Network struct { Inbound bool LocalAddress string RemoteAddress string Static bool Trusted bool }
Network ...
type ServiceIndex ¶
type ServiceIndex int
ServiceIndex ...
const ( // IndexETH ... IndexETH ServiceIndex = iota // IndexIPFS ... IndexIPFS // IndexMax ... IndexMax )
Click to show internal directories.
Click to hide internal directories.