treeconfig

package
v0.48.4 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2026 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SyncBatchSizeDefault                = 1000
	ForesterBatchSizeDefault            = 1000
	SyncWorkerCountDefault              = 20
	ScheduledSyncWorkerPoolLimitDefault = 10
	ClientDialTimeoutDefault            = 2 * time.Second
	ClientCacheSizeDefault              = 32
	ClientMinReconnectIntervalDefault   = 15 * time.Second
	ClientMaxReconnectIntervalDefault   = 1 * time.Minute
	ClientReconnectIntervalIncDefault   = 15 * time.Second
	ClientWaitTimeoutDefault            = 100 * time.Millisecond
	SyncRequestTimeoutDefault           = 30 * time.Second
	LastSyncHeightTTLDefault            = 24 * time.Hour
	SubTreeBatchSizeDefault             = 1000
)

Variables

This section is empty.

Functions

This section is empty.

Types

type TreeConfig

type TreeConfig struct {
	// contains filtered or unexported fields
}

TreeConfig is a wrapper over "tree" config section which provides access to the configuration of the tree service.

func Tree

func Tree(c *config.Config) TreeConfig

Tree returns structure that provides access to a "tree" configuration subsection.

func (TreeConfig) AuthorizedKeys added in v0.37.0

func (c TreeConfig) AuthorizedKeys() keys.PublicKeys

AuthorizedKeys parses and returns an array of "authorized_keys" config parameter from "tree" section.

Returns an empty list if not set.

func (TreeConfig) CacheSize

func (c TreeConfig) CacheSize() int

CacheSize returns the value of "cache_size" config parameter from the "tree" section.

Returns `0` if config value is not specified.

func (TreeConfig) ClientCacheSize added in v0.47.5

func (c TreeConfig) ClientCacheSize() int

ClientCacheSize returns the value of "cache_size" config parameter from the "tree.client" section.

Returns `ClientCacheSizeDefault` if config value is not specified.

func (TreeConfig) ClientDialTimeout added in v0.47.5

func (c TreeConfig) ClientDialTimeout() time.Duration

ClientDialTimeout returns the value of "dial_timeout" config parameter from the "tree.client" section.

Returns `ClientDialTimeoutDefault` if config value is not specified.

func (TreeConfig) ClientMaxReconnectInterval added in v0.47.5

func (c TreeConfig) ClientMaxReconnectInterval() time.Duration

ClientMaxReconnectInterval returns the value of "max_reconnect_interval" config parameter from the "tree.client" section.

Returns `ClientMaxReconnectIntervalDefault` if config value is not specified.

func (TreeConfig) ClientMinReconnectInterval added in v0.47.5

func (c TreeConfig) ClientMinReconnectInterval() time.Duration

ClientMinReconnectInterval returns the value of "min_reconnect_interval" config parameter from the "tree.client" section.

Returns `ClientMinReconnectIntervalDefault` if config value is not specified.

func (TreeConfig) ClientReconnectIntervalInc added in v0.47.5

func (c TreeConfig) ClientReconnectIntervalInc() time.Duration

ClientReconnectIntervalInc returns the value of "reconnect_interval_inc" config parameter from the "tree.client" section.

Returns `ClientReconnectIntervalIncDefault` if config value is not specified.

func (TreeConfig) ClientWaitTimeout added in v0.47.5

func (c TreeConfig) ClientWaitTimeout() time.Duration

ClientWaitTimeout returns the value of "wait_timeout" config parameter from the "tree.client" section.

Returns `ClientWaitTimeoutDefault` if config value is not specified.

func (TreeConfig) Enabled

func (c TreeConfig) Enabled() bool

Enabled returns the value of "enabled" config parameter from the "tree" section.

Returns `false` if config value is not specified.

func (TreeConfig) ForesterBatchSize added in v0.48.0

func (c TreeConfig) ForesterBatchSize() int

ForesterBatchSize returns the value of "forester_batch_size" config parameter from the "tree" section.

Returns `ForesterBatchSizeDefault` if config value is not specified.

func (TreeConfig) ForesterMaxDuration added in v0.48.0

func (c TreeConfig) ForesterMaxDuration() time.Duration

ForesterMaxDuration returns the value of "forester_max_duration".

func (TreeConfig) ForesterSchedule added in v0.48.0

func (c TreeConfig) ForesterSchedule() (schedule sharedtypes.Schedule, ok bool)

ForesterSchedule returns value of "forester_schedule".

func (TreeConfig) LastSyncHeightTTL added in v0.48.0

func (c TreeConfig) LastSyncHeightTTL() time.Duration

LastSyncHeightTTL returns the value of "last_sync_height_ttl" config parameter from the "tree" section.

func (TreeConfig) LocalApplyTimeout added in v0.48.0

func (c TreeConfig) LocalApplyTimeout() time.Duration

LocalApplyTimeout returns the value of "local_apply_timeout" config parameter from the "tree" section.

Returns `0` if config value is not specified.

func (TreeConfig) ReplicationChannelCapacity

func (c TreeConfig) ReplicationChannelCapacity() int

ReplicationChannelCapacity returns the value of "replication_channel_capacity" config parameter from the "tree" section.

Returns `0` if config value is not specified.

func (TreeConfig) ReplicationTimeout

func (c TreeConfig) ReplicationTimeout() time.Duration

ReplicationTimeout returns the value of "replication_timeout" config parameter from the "tree" section.

Returns `0` if config value is not specified.

func (TreeConfig) ReplicationWorkerCount

func (c TreeConfig) ReplicationWorkerCount() int

ReplicationWorkerCount returns the value of "replication_worker_count" config parameter from the "tree" section.

Returns `0` if config value is not specified.

func (TreeConfig) ScheduledSyncWorkerPoolLimit added in v0.48.0

func (c TreeConfig) ScheduledSyncWorkerPoolLimit() int

ScheduledSyncWorkerPoolLimit returns the value of "scheduled_sync_worker_pool_limit" config parameter from the "tree" section.

Returns `ScheduledSyncWorkerPoolLimitDefault` if config value is not specified.

func (TreeConfig) SubTreeBatchSize added in v0.48.0

func (c TreeConfig) SubTreeBatchSize() int

SubTreeBatchSize returns the value of "subtree_batch_size" config parameter from the "tree" section.

Returns SubTreeBatchSizeDefault if config value is not specified or negative.

func (TreeConfig) SyncBatchSize added in v0.44.0

func (c TreeConfig) SyncBatchSize() int

SyncBatchSize returns the value of "sync_batch_size" config parameter from the "tree" section.

Returns `SyncBatchSizeDefault` if config value is not specified.

func (TreeConfig) SyncMaxDuration added in v0.47.8

func (c TreeConfig) SyncMaxDuration() time.Duration

SyncMaxDuration returns the value of "sync_max_duration".

func (TreeConfig) SyncRequestTimeout added in v0.47.11

func (c TreeConfig) SyncRequestTimeout() time.Duration

SyncRequestTimeout returns the value of "sync_request_timeout" config parameter from the "tree" section.

Returns `0` if config value is not specified.

func (TreeConfig) SyncSchedule added in v0.47.8

func (c TreeConfig) SyncSchedule() (schedule sharedtypes.Schedule, ok bool)

SyncSchedule returns the value of "sync_schedule".

func (TreeConfig) SyncWorkerCount added in v0.46.9

func (c TreeConfig) SyncWorkerCount() int

SyncWorkerCount returns the value of "sync_worker_count" config parameter from the "tree" section.

Returns `SyncWorkerCountDefault` if config value is not specified.

func (TreeConfig) UnsafeSyncDisabled added in v0.45.0

func (c TreeConfig) UnsafeSyncDisabled() bool

UnsafeSyncDisabled returns the value of "unsafe_sync_disabled" config parameter from the "tree" section.

func (TreeConfig) WaitSyncCompleteOnStartup added in v0.46.4

func (c TreeConfig) WaitSyncCompleteOnStartup() bool

WaitSyncCompleteOnStartup returns the value of "wait_sync_complete_on_startup" config parameter from the "tree" section.

Jump to

Keyboard shortcuts

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