Documentation ¶
Index ¶
- Constants
- Variables
- func InitIpfs(identity native.Identity) (*native.Config, 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
Functions ¶
Types ¶
type Account ¶
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 ¶
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 CafeHost ¶
type CafeHost struct {
Open bool // when true, other peers can register with this node for cafe services
}
TODO: add some more knobs: max num. clients, max client msg age, inbox size, etc.
type Config ¶
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 ¶
type Logs struct { LogToDisk bool // when true, sends all logs to rolling files on disk LogLevel string // one of: critical error warning notice info debug }
Logs settings
type MobileCafeClient ¶
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 ¶
type ThreadDefaults ¶
type ThreadDefaults struct {
ID string // default thread ID for reads/writes
}
ThreadDefaults settings