Documentation ¶
Index ¶
- Constants
- func Attributes(c *config.Config) (attrs []string)
- func BootstrapAddresses(c *config.Config) (addr network.AddressGroup)
- func CompatibilityMode(c *config.Config) bool
- func Key(c *config.Config) *keys.PrivateKey
- func Relay(c *config.Config) bool
- func Wallet(c *config.Config) *keys.PrivateKey
- type PersistentPolicyRulesConfig
- type PersistentSessionsConfig
- type PersistentStateConfig
Constants ¶
const (
// PermDefault is a default permission bits for local override storage file.
PermDefault = 0o644
)
const (
// PersistentStatePathDefault is a default path for persistent state file.
PersistentStatePathDefault = ".frostfs-storage-state"
)
Variables ¶
This section is empty.
Functions ¶
func Attributes ¶
Attributes returns list of config parameters from "node" section that are set in "attribute_i" format, where i in range [0,100).
func BootstrapAddresses ¶
func BootstrapAddresses(c *config.Config) (addr network.AddressGroup)
BootstrapAddresses returns the value of "addresses" config parameter from "node" section as network.AddressGroup.
Panics if the value is not a string list of valid NeoFS network addresses.
func CompatibilityMode ¶ added in v0.38.3
CompatibilityMode returns true if need to run node in compatibility with previous versions mode.
func Key ¶
func Key(c *config.Config) *keys.PrivateKey
Key returns the value of "key" config parameter from "node" section.
If the value is not set, fallbacks to Wallet section.
Panics if the value is incorrect filename of binary encoded private key.
Types ¶
type PersistentPolicyRulesConfig ¶ added in v0.38.0
type PersistentPolicyRulesConfig struct {
// contains filtered or unexported fields
}
PersistentPolicyRulesConfig is a wrapper over "persistent_policy_rules" config section which provides access to persistent policy rules storage configuration of node.
func PersistentPolicyRules ¶ added in v0.38.0
func PersistentPolicyRules(c *config.Config) PersistentPolicyRulesConfig
PersistentPolicyRules returns structure that provides access to "persistent_policy_rules" subsection of "node" section.
func (PersistentPolicyRulesConfig) NoSync ¶ added in v0.38.0
func (l PersistentPolicyRulesConfig) NoSync() bool
NoSync returns the value of "no_sync" config parameter as a bool value.
Returns false if the value is not a boolean.
func (PersistentPolicyRulesConfig) Path ¶ added in v0.38.0
func (l PersistentPolicyRulesConfig) Path() string
Path returns the value of "path" config parameter.
Returns empty string if missing, for compatibility with older configurations.
func (PersistentPolicyRulesConfig) Perm ¶ added in v0.38.0
func (l PersistentPolicyRulesConfig) Perm() fs.FileMode
Perm returns the value of "perm" config parameter as a fs.FileMode.
Returns PermDefault if the value is not a positive number.
type PersistentSessionsConfig ¶
type PersistentSessionsConfig struct {
// contains filtered or unexported fields
}
PersistentSessionsConfig is a wrapper over "persistent_sessions" config section which provides access to persistent session tokens storage configuration of node.
func PersistentSessions ¶
func PersistentSessions(c *config.Config) PersistentSessionsConfig
PersistentSessions returns structure that provides access to "persistent_sessions" subsection of "node" section.
func (PersistentSessionsConfig) Path ¶
func (p PersistentSessionsConfig) Path() string
Path returns the value of "path" config parameter.
type PersistentStateConfig ¶
type PersistentStateConfig struct {
// contains filtered or unexported fields
}
PersistentStateConfig is a wrapper over "persistent_state" config section which provides access to persistent state storage configuration of node.
func PersistentState ¶
func PersistentState(c *config.Config) PersistentStateConfig
PersistentState returns structure that provides access to "persistent_state" subsection of "node" section.
func (PersistentStateConfig) Path ¶
func (p PersistentStateConfig) Path() string
Path returns the value of "path" config parameter.
Returns PersistentStatePathDefault if the value is not a non-empty string.