config

package
v0.1.11 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2022 License: Apache-2.0, MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

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

Variables

View Source
var DealProtocolsVersionsMap = map[string]protocol.ID{
	// contains filtered or unexported fields
}
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"`
	IsDisabled                   bool                 `json:"disabled"`
	IsVerified                   bool                 `json:"verified"`
	Duration                     abi.ChainEpoch       `json:"duration"`
	EnabledDealProtocolsVersions map[protocol.ID]bool `json:"enabled_deal_protocol_versions"`
	MaxVerifiedPrice             big.Int              `json:"max_verified_price"`
	MaxPrice                     big.Int              `json:"max_price"`
}

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"`
	LightstepToken         string        `json:"lightstep_token"`
	Hostname               string        `json:"hostname"`
	DisableAutoRetrieve    bool          `json:"enable_autoretrieve"`
	LowMem                 bool          `json:"low_mem"`
	DisableFilecoinStorage bool          `json:"disable_filecoin_storage"`
	DisableSwaggerEndpoint bool          `json:"disable_swagger_endpoint"`
	Node                   Node          `json:"node"`
	Jaeger                 Jaeger        `json:"jaeger"`
	Deal                   Deal          `json:"deal"`
	Content                Content       `json:"content"`
	Logging                Logging       `json:"logging"`
	StagingBucket          StagingBucket `json:"staging_bucket"`
	Replication            int           `json:"replication"`
	RPCMessage             RPCMessage    `json:"rpc_message"`
}

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 Jaeger

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

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"`
	IndexerTickInterval       int                      `json:"indexer_tick_interval"`
	EnableWebsocketListenAddr bool                     `json:"enable_websocket_listen_addr"`
	HardFlushWriteLog         bool                     `json:"hard_flush_write_log"`
	WriteLogTruncate          bool                     `json:"write_log_truncate"`
	NoBlockstoreCache         bool                     `json:"no_blockstore_cache"`
	NoLimiter                 bool                     `json:"no_limiter"`
	IndexerURL                string                   `json:"indexer_url"`
	Blockstore                string                   `json:"blockstore"`
	WriteLogDir               string                   `json:"write_log_dir"`
	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                    rcmgr.ScalingLimitConfig `json:"limits"`
	ConnectionManager         ConnectionManager        `json:"connection_manager"`
}

type RPCMessage added in v0.1.10

type RPCMessage struct {
	IncomingQueueSize int `json:"incoming_queue_size"`
	OutgoingQueueSize int `json:"outgoing_queue_size"`
	QueueHandlers     int `json:"queue_handlers"`
}

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"`
	RPCMessage         RPCMessage    `json:"rpc_message"`
}

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 StagingBucket added in v0.1.9

type StagingBucket struct {
	Enabled                 bool          `json:"enabled"`
	MinSize                 int64         `json:"min_size"`
	MaxSize                 int64         `json:"max_size"`
	MinDealSize             int64         `json:"min_deal_size"`
	IndividualDealThreshold int64         `json:"individual_deal_threshold"`
	MaxItems                int           `json:"max_items"`
	MaxContentAge           time.Duration `json:"max_content_age"`
	KeepAlive               time.Duration `json:"keep_alive"`
	MaxLifeTime             time.Duration `json:"max_life_time"`
	AggregateInterval       time.Duration `json:"aggregate_interval"`
}

MaxLifeTime - amount of time a staging zone will remain open before we aggregate it into a piece of content MaxContentAge - maximum amount of time a piece of content will go without either being aggregated or having a deal made for it MinSize - minimum staging bucket size before it can be aggregated MaxSize - maximum staging bucket size before it can be aggregated KeepAlive - staging zones will remain open for at least this long after the last piece of content is added to them (unless they are full) MaxItems - max number of items a bucket can hold before it is aggregated MinDealSize - minimum deal size that bucket must meet before it is ever considered for aggregation AggregateInterval - interval to aggregate staging contents

Jump to

Keyboard shortcuts

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