Documentation ¶
Index ¶
- Constants
- Variables
- func InitIpfs(identity native.Identity, mobile bool) (*native.Config, error)
- func TextileBootstrapPeers() ([]native.BootstrapPeer, error)
- func UpdateIpfs(rep repo.Repo, key string, value interface{}) error
- func Write(repoPath string, conf *Config) error
- type API
- type Account
- type Addresses
- type Cafe
- type CafeClient
- type CafeHost
- type Config
- type Logs
- type MobileCafeClient
- type SwarmPorts
- type ThreadDefaults
- type Threads
Constants ¶
const DefaultConnMgrGracePeriod = time.Second * 20
DefaultConnMgrGracePeriod is the default value for the connection managers grace period
const DefaultConnMgrHighWater = 900
DefaultConnMgrHighWater is the default value for the connection managers 'high water' mark
const DefaultConnMgrLowWater = 600
DefaultConnMgrLowWater is the default value for the connection managers 'low water' mark
Variables ¶
var DefaultServerFilters = []string{
"/ip4/10.0.0.0/ipcidr/8",
"/ip4/100.64.0.0/ipcidr/10",
"/ip4/169.254.0.0/ipcidr/16",
"/ip4/172.16.0.0/ipcidr/12",
"/ip4/192.0.0.0/ipcidr/24",
"/ip4/192.0.0.0/ipcidr/29",
"/ip4/192.0.0.8/ipcidr/32",
"/ip4/192.0.0.170/ipcidr/32",
"/ip4/192.0.0.171/ipcidr/32",
"/ip4/192.0.2.0/ipcidr/24",
"/ip4/192.168.0.0/ipcidr/16",
"/ip4/198.18.0.0/ipcidr/15",
"/ip4/198.51.100.0/ipcidr/24",
"/ip4/203.0.113.0/ipcidr/24",
"/ip4/240.0.0.0/ipcidr/4",
}
DefaultServerFilters has a list of non-routable IPv4 prefixes according to http://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml
var TextileBootstrapAddresses = []string{
"/ip4/18.144.12.135/tcp/4001/ipfs/12D3KooWGBW3LfzypK3zgV4QxdPyUm3aEuwBDMKRRpCPm9FrJvar",
"/ip4/13.57.23.210/tcp/4001/ipfs/12D3KooWQue2dSRqnZTVvikoxorZQ5Qyyug3hV65rYnWYpYsNMRE",
"/ip4/18.221.167.133/tcp/4001/ipfs/12D3KooWERmHT6g4YkrPBTmhfDLjfi8b662vFCfvBXqzcdkPGQn1",
"/ip4/18.224.173.65/tcp/4001/ipfs/12D3KooWLh9Gd4C3knv4XqCyCuaNddfEoSLXgekVJzRyC5vsjv5d",
"/ip4/35.180.16.103/tcp/4001/ipfs/12D3KooWDhSfXZCBVAK6SNQu7h6mfGCBJtjMS44PW5YA5YCjVmjB",
"/ip4/35.180.35.45/tcp/4001/ipfs/12D3KooWBCZEDkZ2VxdNYKLLUACWbXMvW9SpVbbvoFR9CtH4qJv9",
"/ip4/13.250.53.27/tcp/4001/ipfs/12D3KooWQ5MR9Ugz9HkVU3fYFbiWbQR4jxKJB66JoSY7nP5ShsqQ",
"/ip4/3.1.49.130/tcp/4001/ipfs/12D3KooWDWJ473M3fXMEcajbaGtqgr6i6SvDdh5Ru9i5ZzoJ9Qy8",
}
TextileBootstrapAddresses are the addresses of cafe nodes run by the Textile team.
Functions ¶
func TextileBootstrapPeers ¶ added in v0.1.10
func TextileBootstrapPeers() ([]native.BootstrapPeer, error)
TextileBootstrapPeers returns the (parsed) set of Textile bootstrap peers.
func UpdateIpfs ¶ added in v0.1.10
UpdateIpfs updates the IPFS config file
Types ¶
type API ¶ added in v0.1.10
type API struct { HTTPHeaders map[string][]string // HTTP headers to return with the API. SizeLimit int64 // Maximum file size limit to accept for POST requests in bytes }
API settings
type Account ¶ added in v0.1.10
type Account struct { Address string // public key (seed is stored in the _possibly_ encrypted datastore) Thread string // thread id of the default account thread used for sync between account peers }
Account store public account info
type Addresses ¶ added in v0.1.10
type Addresses struct { API string // address of the local API (RPC) CafeAPI string // address of the cafe REST API Gateway string // address to listen on for IPFS HTTP object gateway }
Addresses stores the (string) bind addresses for the node.
type CafeClient ¶ added in v0.1.10
type CafeClient struct {
Mobile MobileCafeClient
}
CafeClient settings
type CafeHost ¶ added in v0.1.10
type CafeHost struct { Open bool // When true, other peers can register with this node for cafe services. PublicIP string // Useful with a server that has a public IP address. URL string // Specifies the URL of this cafe. NeighborURL string // Specifies the URL of a secondary cafe. Must return cafe info. SizeLimit int64 // Maximum file size limit to accept for POST requests in bytes. }
TODO: add some more knobs: max num. clients, max client msg age, inbox size, etc.
type Config ¶ added in v0.1.10
type Config struct { Account Account // local node's account (public info only) Addresses Addresses // local node's addresses API API // local node's API settings Logs Logs // local node's log settings Threads Threads // local node's thread settings IsMobile bool // local node is setup for mobile IsServer bool // local node is setup for a server w/ a public IP Cafe Cafe // local node cafe settings }
Config is used to load textile config files.
type Logs ¶ added in v0.1.10
type Logs struct {
LogToDisk bool // when true, sends all logs to rolling files on disk
}
Logs settings
type MobileCafeClient ¶ added in v0.1.10
type MobileCafeClient struct { // messages w/ size less than limit will be handled by the p2p cafe service, // messages w/ size greater than limit will be handled by the mobile OS's background // upload service and the cafe HTTP API P2PWireLimit int }
MobileCafeClient settings
type SwarmPorts ¶ added in v0.1.10
type ThreadDefaults ¶ added in v0.1.10
type ThreadDefaults struct {
ID string // default thread ID for reads/writes
}
ThreadDefaults settings
type Threads ¶ added in v0.1.10
type Threads struct {
Defaults ThreadDefaults // default settings
}
Thread settings