config

package
v0.3.9 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2023 License: Apache-2.0, MIT Imports: 17 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
	MinSize             int64 `json:"min_size"`
	MaxSize             int64 `json:"max_size"`
}

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"`
	RpcEngine              RpcEngine     `json:"rpc_engine"`
	Pinning                Pinning       `json:"pinning"`
	RateLimit              rate.Limit    `json:"rate_limit"`
}

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

func (*Estuary) Validate added in v0.2.3

func (cfg *Estuary) Validate() 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"`
	IndexerAdvertisementInterval  time.Duration            `json:"indexer_advertisement_interval"`
	AdvertiseOfflineAutoretrieves bool                     `json:"advertise_offline_autoretrieve"`
	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"`
	Libp2pThrottleLimit           uint                     `json:"libp2p_http_server_throttle_limit"`
	Bitswap                       Bitswap                  `json:"bitswap"`
	Limits                        rcmgr.ScalingLimitConfig `json:"limits"`
	ConnectionManager             ConnectionManager        `json:"connection_manager"`
}

type Pinning added in v0.2.0

type Pinning struct {
	RetryWorker RetryWorker `json:"retry_worker"`
}

type QueueEngine added in v0.3.0

type QueueEngine struct {
	Host      string `json:"host"`
	Consumers int    `json:"consumers"`
	Enabled   bool   `json:"enabled"`
	Driver    string `json:"driver"`
}

type RetryWorker added in v0.2.0

type RetryWorker struct {
	Interval               time.Duration `json:"interval"`
	BatchSelectionLimit    int           `json:"batch_limit"`
	BatchSelectionDuration time.Duration `json:"batch_duration"`
}

type RpcEngine added in v0.3.0

type RpcEngine struct {
	Queue     QueueEngine     `json:"queue"`
	Websocket WebsocketEngine `json:"websocket"`
}

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"`
	RateLimit          rate.Limit    `json:"rate_limit"`
	Node               Node          `json:"node"`
	Jaeger             Jaeger        `json:"jaeger"`
	Content            Content       `json:"content"`
	Logging            Logging       `json:"logging"`
	EstuaryRemote      EstuaryRemote `json:"estuary_remote"`
	RpcEngine          RpcEngine     `json:"rpc_engine"`
}

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"`
	AggregateInterval time.Duration `json:"aggregate_interval"`
	CreationInterval  time.Duration `json:"creation_interval"`
}

MinSize - minimum staging bucket size before it can be aggregated MaxSize - maximum staging bucket size before it can be aggregated AggregateInterval - interval to aggregate staging contents

type WebsocketEngine added in v0.3.0

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

Jump to

Keyboard shortcuts

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