config

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2022 License: Apache-2.0, MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultWebsocketAddr = "/ip4/0.0.0.0/tcp/6747/ws"

Variables

View Source
var ErrEmptyPath = errors.New("node not initialized, please run configure")
View Source
var ErrNotInitialized = errors.New("node not initialized, please run configure")

Functions

This section is empty.

Types

type Bitswap

type Bitswap struct {
	MaxOutstandingBytesPerPeer int64 `json:"max_outstanding_bytes_per_peer"`
	TargetMessageSize          int   `json:"target_message_size"`
}

type ConnectionManager

type ConnectionManager struct {
	HighWater int `json:"high_water"`
	LowWater  int `json:"low_water"`
}

type Content

type Content struct {
	DisableLocalAdding  bool `json:"disable_local_adding"`
	DisableGlobalAdding bool `json:"disable_global_adding"` // not valid for shuttle
}

type Deal

type Deal struct {
	FailOnTransferFailure bool `json:"fail_on_transfer_failure"`
	Disable               bool `json:"disable"`
	Verified              bool `json:"verified"`
}

type Estuary

type Estuary struct {
	AppVersion             string    `json:"app_version"`
	DatabaseConnString     string    `json:"database_conn_string"`
	StagingDataDir         string    `json:"staging_data_dir"`
	ServerCacheDir         string    `json:"server_cache_dir"`
	DataDir                string    `json:"data_dir"`
	ApiListen              string    `json:"api_listen"`
	EnableAutoRetrieve     bool      `json:"enable_autoretrieve"`
	LightstepToken         string    `json:"lightstep_token"`
	Hostname               string    `json:"hostname"`
	Node                   Node      `json:"node"`
	Jaeger                 Jaeger    `json:"jaeger"`
	Deal                   Deal      `json:"deal"`
	Content                Content   `json:"content"`
	LowMem                 bool      `json:"low_mem"`
	DisableFilecoinStorage bool      `json:"disable_filecoin_storage"`
	Replication            int       `json:"replication"`
	Logging                Logging   `json:"logging"`
	FilClient              FilClient `json:"fil_client"`
	ShuttleMessageHandlers int       `json:"shuttle_message_Handlers"`
}

func NewEstuary

func NewEstuary(appVersion string) *Estuary

func (*Estuary) Load

func (cfg *Estuary) Load(filename string) error

func (*Estuary) Save

func (cfg *Estuary) Save(filename string) error

save writes the config from `cfg` into `filename`.

func (*Estuary) SetRequiredOptions

func (cfg *Estuary) SetRequiredOptions() error

type EstuaryRemote

type EstuaryRemote struct {
	Api       string `json:"api"`
	Handle    string `json:"handle"`
	AuthToken string `json:"auth_token"`
}

type EventRateLimiter

type EventRateLimiter struct {
	TTL       time.Duration `json:"ttl"`
	CacheSize uint          `json:"cache_size"`
}

type FilClient

type FilClient struct {
	EventRateLimiter EventRateLimiter `json:"event_rate_limiter"`
}

type Jaeger

type Jaeger struct {
	EnableTracing bool    `json:"enable_tracing"`
	ProviderUrl   string  `json:"provider_url"`
	SamplerRatio  float64 `json:"sampler_ratio"`
}

type Limits

type Limits struct {
	SystemLimit    SystemLimit    `json:"system_limit"`
	TransientLimit TransientLimit `json:"transient_limit"`
}

type Logging

type Logging struct {
	ApiEndpointLogging bool `json:"api_endpoint_logging"`
}

type Node

type Node struct {
	ListenAddrs               []string              `json:"listen_addrs"`
	AnnounceAddrs             []string              `json:"announce_addrs"`
	PeeringPeers              []peering.PeeringPeer `json:"peering_peers"`
	EnableWebsocketListenAddr bool                  `json:"enable_websocket_listen_addr"`

	Blockstore string `json:"blockstore"`

	WriteLogDir       string `json:"write_log_dir"`
	HardFlushWriteLog bool   `json:"hard_flush_write_log"`
	WriteLogTruncate  bool   `json:"write_log_truncate"`
	NoBlockstoreCache bool   `json:"no_blockstore_cache"`
	NoLimiter         bool   `json:"no_limiter"`

	Libp2pKeyFile string `json:"libp2p_key_file"`

	DatastoreDir string `json:"datastore_dir"`

	WalletDir string `json:"wallet_dir"`

	ApiURL            string            `json:"api_url"`
	Bitswap           Bitswap           `json:"bitswap"`
	Limits            Limits            `json:"limits"`
	ConnectionManager ConnectionManager `json:"connection_manager"`
}

func (*Node) GetLimiter

func (cfg *Node) GetLimiter() *rcmgr.BasicLimiter

func (*Node) GetPeeringPeersStr added in v0.1.1

func (cfg *Node) GetPeeringPeersStr() string

type Shuttle

type Shuttle struct {
	AppVersion         string        `json:"app_version"`
	DatabaseConnString string        `json:"database_conn_string"`
	StagingDataDir     string        `json:"staging_data_dir"`
	DataDir            string        `json:"data_dir"`
	ApiListen          string        `json:"api_listen"`
	Hostname           string        `json:"hostname"`
	Private            bool          `json:"private"`
	Dev                bool          `json:"dev"`
	NoReloadPinQueue   bool          `json:"no_reload_pin_queue"`
	Node               Node          `json:"node"`
	Jaeger             Jaeger        `json:"jaeger"`
	Content            Content       `json:"content"`
	Logging            Logging       `json:"logging"`
	EstuaryRemote      EstuaryRemote `json:"estuary_remote"`
	FilClient          FilClient     `json:"fil_client"`
}

func NewShuttle

func NewShuttle(appVersion string) *Shuttle

func (*Shuttle) Load

func (cfg *Shuttle) Load(filename string) error

func (*Shuttle) Save

func (cfg *Shuttle) Save(filename string) error

save writes the config from `cfg` into `filename`.

func (*Shuttle) SetRequiredOptions

func (cfg *Shuttle) SetRequiredOptions() error

func (*Shuttle) Validate

func (cfg *Shuttle) Validate() error

type SystemLimit

type SystemLimit struct {
	MinMemory      int64   `json:"min_memory"`
	MaxMemory      int64   `json:"max_memory"`
	MemoryFraction float64 `json:"memory_fraction"`

	StreamsInbound  int `json:"streams_inbound"`
	StreamsOutbound int `json:"streams_outbound"`
	Streams         int `json:"streams"`

	ConnsInbound  int `json:"conns_inbound"`
	ConnsOutbound int `json:"conns_outbound"`
	Conns         int `json:"conns"`

	FD int `json:"fd"`
}

type TransientLimit

type TransientLimit struct {
	StreamsInbound  int `json:"streams_inbound"`
	StreamsOutbound int `json:"streams_outbound"`
	Streams         int `json:"streams"`

	ConnsInbound  int `json:"conns_inbound"`
	ConnsOutbound int `json:"conns_outbound"`
	Conns         int `json:"conns"`

	FD int `json:"fd"`
}

Jump to

Keyboard shortcuts

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