config

package
v1.5.6 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2024 License: MIT Imports: 25 Imported by: 1

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               `toml:"logging"`
	Server               server.Config               `toml:"server"`
	App                  node.Config                 `toml:"app"`
	WS                   ws.Config                   `toml:"ws"`
	RPC                  rpc.Config                  `toml:"rpc"`
	Broker               broker.Config               `toml:"broker"`
	Redis                rconfig.RedisConfig         `toml:"redis"`
	LegacyRedisBroadcast broadcast.LegacyRedisConfig `toml:"redis_pubsub_broadcast"`
	RedisBroadcast       broadcast.RedisConfig       `toml:"redis_stream_broadcast"`
	NATSBroadcast        broadcast.LegacyNATSConfig  `toml:"nats_broadcast"`
	HTTPBroadcast        broadcast.HTTPConfig        `toml:"http_broadcast"`
	RedisPubSub          pubsub.RedisConfig          `toml:"redis_pubsub"`
	NATSPubSub           pubsub.NATSConfig           `toml:"nats_pubsub"`
	NATS                 nconfig.NATSConfig          `toml:"nats"`
	DisconnectorDisabled bool
	DisconnectQueue      node.DisconnectQueueConfig `toml:"disconnector"`
	Metrics              metrics.Config             `toml:"metrics"`
	JWT                  identity.JWTConfig         `toml:"jwt"`
	EmbeddedNats         enats.Config               `toml:"embedded_nats"`
	SSE                  sse.Config                 `toml:"sse"`
	Streams              streams.Config             `toml:"streams"`

	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