config

package
v1.5.4 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2024 License: MIT Imports: 25 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ID                   string `toml:"node_id"`
	UserProvidedID       bool
	Secret               string   `toml:"secret"`
	BroadcastKey         string   `toml:"broadcast_key"`
	SkipAuth             bool     `toml:"noauth"`
	PublicMode           bool     `toml:"public"`
	BroadcastAdapters    []string `toml:"broadcast_adapters"`
	PubSubAdapter        string   `toml:"pubsub_adapter"`
	UserPresets          []string `toml:"presets"`
	Log                  logger.Config
	Server               server.Config
	App                  node.Config
	WS                   ws.Config
	RPC                  rpc.Config
	Broker               broker.Config
	Redis                rconfig.RedisConfig
	LegacyRedisBroadcast broadcast.LegacyRedisConfig
	RedisBroadcast       broadcast.RedisConfig
	NATSBroadcast        broadcast.LegacyNATSConfig
	HTTPBroadcast        broadcast.HTTPConfig
	RedisPubSub          pubsub.RedisConfig
	NATSPubSub           pubsub.NATSConfig
	NATS                 nconfig.NATSConfig
	DisconnectorDisabled bool
	DisconnectQueue      node.DisconnectQueueConfig
	Metrics              metrics.Config
	JWT                  identity.JWTConfig
	EmbeddedNats         enats.Config
	SSE                  sse.Config
	Streams              streams.Config

	ConfigFilePath string
}

Config contains main application configuration

func NewConfig added in v1.2.3

func NewConfig() Config

NewConfig returns a new empty config

func (*Config) LoadFromFile added in v1.5.4

func (c *Config) LoadFromFile() error

func (*Config) LoadPresets added in v1.3.0

func (c *Config) LoadPresets(logger *slog.Logger) error

func (*Config) Presets added in v1.3.0

func (c *Config) Presets() []string

func (Config) ToToml added in v1.5.4

func (c Config) ToToml() string

Jump to

Keyboard shortcuts

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