Documentation ¶
Index ¶
- Constants
- func Attributes(c *config.Config) (attrs []string)
- func BootstrapAddresses(c *config.Config) (addr network.AddressGroup)
- func Key(c *config.Config) *keys.PrivateKey
- func Relay(c *config.Config) bool
- func Wallet(c *config.Config) *keys.PrivateKey
- type NotificationConfig
- func (n NotificationConfig) CAPath() string
- func (n NotificationConfig) CertPath() string
- func (n NotificationConfig) DefaultTopic() string
- func (n NotificationConfig) Enabled() bool
- func (n NotificationConfig) Endpoint() string
- func (n NotificationConfig) KeyPath() string
- func (n NotificationConfig) Timeout() time.Duration
- type PersistentSessionsConfig
- type PersistentStateConfig
- type SubnetConfig
Constants ¶
const ( // PersistentStatePathDefault is a default path for persistent state file. PersistentStatePathDefault = ".frostfs-storage-state" // NotificationTimeoutDefault is a default timeout for object notification operation. NotificationTimeoutDefault = 5 * time.Second )
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 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 NotificationConfig ¶
type NotificationConfig struct {
// contains filtered or unexported fields
}
NotificationConfig is a wrapper over "notification" config section which provides access to object notification configuration of node.
func Notification ¶
func Notification(c *config.Config) NotificationConfig
Notification returns structure that provides access to "notification" subsection of "node" section.
func (NotificationConfig) CAPath ¶
func (n NotificationConfig) CAPath() string
CAPath returns the value of "ca_path" config parameter from "notification" subsection of "node" section.
Returns empty string if the value is not presented.
func (NotificationConfig) CertPath ¶
func (n NotificationConfig) CertPath() string
CertPath returns the value of "certificate_path" config parameter from "notification" subsection of "node" section.
Returns empty string if the value is not presented.
func (NotificationConfig) DefaultTopic ¶
func (n NotificationConfig) DefaultTopic() string
DefaultTopic returns the value of "default_topic" config parameter from "notification" subsection of "node" section.
Returns empty string if the value is not presented.
func (NotificationConfig) Enabled ¶
func (n NotificationConfig) Enabled() bool
Enabled returns the value of "enabled" config parameter from "notification" subsection of "node" section.
Returns false if the value is not presented.
func (NotificationConfig) Endpoint ¶
func (n NotificationConfig) Endpoint() string
Endpoint returns the value of "endpoint" config parameter from "notification" subsection of "node" section.
Returns empty string if the value is not presented.
func (NotificationConfig) KeyPath ¶
func (n NotificationConfig) KeyPath() string
KeyPath returns the value of "key_path" config parameter from "notification" subsection of "node" section.
Returns empty string if the value is not presented.
func (NotificationConfig) Timeout ¶
func (n NotificationConfig) Timeout() time.Duration
Timeout returns the value of "timeout" config parameter from "notification" subsection of "node" section.
Returns NotificationTimeoutDefault if the value is not positive.
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.
type SubnetConfig ¶
SubnetConfig represents node configuration related to subnets.
func (SubnetConfig) ExitZero ¶
func (x SubnetConfig) ExitZero() bool
ExitZero returns the value of "exit_zero" config parameter as bool. Returns false if the value can not be cast.
func (*SubnetConfig) Init ¶
func (x *SubnetConfig) Init(root config.Config)
Init initializes SubnetConfig from "subnet" sub-section of "node" section of the root config.
func (SubnetConfig) IterateSubnets ¶
func (x SubnetConfig) IterateSubnets(f func(string))
IterateSubnets casts the value of "entries" config parameter to string slice, iterates over all of its elements and passes them to f.
Does nothing if the value can not be cast to string slice.