Documentation ¶
Index ¶
- func NewHostConfigOption(hopt ipfs_p2p.HostOption, cfg *HostConfig) ipfs_p2p.HostOption
- func NewRoutingConfigOption(ro ipfs_p2p.RoutingOption, rc *RoutingConfig) ipfs_p2p.RoutingOption
- type HostConfig
- type HostConfigFunc
- type HostMobile
- type IpfsConfig
- type IpfsMobile
- type RepoConfigPatch
- type RepoMobile
- type RoutingConfig
- type RoutingConfigFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewHostConfigOption ¶
func NewHostConfigOption(hopt ipfs_p2p.HostOption, cfg *HostConfig) ipfs_p2p.HostOption
func NewRoutingConfigOption ¶
func NewRoutingConfigOption(ro ipfs_p2p.RoutingOption, rc *RoutingConfig) ipfs_p2p.RoutingOption
Types ¶
type HostConfig ¶
type HostConfig struct { // called after host init ConfigFunc HostConfigFunc // p2p options Options []p2p.Option }
@TODO: add custom mobile option here
type HostConfigFunc ¶
func ChainHostConfig ¶
func ChainHostConfig(cfgs ...HostConfigFunc) HostConfigFunc
type HostMobile ¶
type IpfsConfig ¶
type IpfsConfig struct { HostConfig *HostConfig HostOption ipfs_p2p.HostOption RoutingConfig *RoutingConfig RoutingOption ipfs_p2p.RoutingOption RepoMobile *RepoMobile ExtraOpts map[string]bool }
type IpfsMobile ¶
type IpfsMobile struct { *ipfs_core.IpfsNode Repo *RepoMobile // contains filtered or unexported fields }
func NewNode ¶
func NewNode(ctx context.Context, cfg *IpfsConfig) (*IpfsMobile, error)
func (*IpfsMobile) Close ¶
func (im *IpfsMobile) Close() error
func (*IpfsMobile) PeerHost ¶
func (im *IpfsMobile) PeerHost() p2p_host.Host
func (*IpfsMobile) ServeCoreHTTP ¶
func (im *IpfsMobile) ServeCoreHTTP(l net.Listener, opts ...ipfs_corehttp.ServeOption) error
func (*IpfsMobile) ServeGateway ¶
func (im *IpfsMobile) ServeGateway(l net.Listener, writable bool, opts ...ipfs_corehttp.ServeOption) error
type RepoConfigPatch ¶
type RepoConfigPatch func(cfg *ipfs_config.Config) (err error)
func ChainIpfsConfigPatch ¶
func ChainIpfsConfigPatch(patchs ...RepoConfigPatch) RepoConfigPatch
type RepoMobile ¶
func NewRepoMobile ¶
func NewRepoMobile(path string, repo ipfs_repo.Repo) *RepoMobile
func (*RepoMobile) ApplyPatchs ¶
func (mr *RepoMobile) ApplyPatchs(patchs ...RepoConfigPatch) error
type RoutingConfig ¶
type RoutingConfig struct {
ConfigFunc RoutingConfigFunc
}
type RoutingConfigFunc ¶
type RoutingConfigFunc func(p2p_host.Host, p2p_routing.Routing) error
Click to show internal directories.
Click to hide internal directories.