Documentation ¶
Index ¶
Constants ¶
View Source
const (
MaxMessageSize = 65536 // Maximum message size allowed from/to the peer.
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // Default HTTP(S) address:port to listen on for websocket. Either a // numeric or a canonical name, e.g. ":80" or ":https". Could include a host name, e.g. // "localhost:80". // Could be blank: if TLS is not configured, will use ":80", otherwise ":443". // Can be overridden from the command line, see option --listen. Listen string `json:"listen"` // Default HTTP(S) address:port to listen on for grpc. Either a // numeric or a canonical name, e.g. ":80" or ":https". Could include a host name, e.g. // "localhost:80". // Could be blank: if TLS is not configured, will use ":80", otherwise ":443". // Can be overridden from the command line, see option --listen. GrpcListen string `json:"grpc_listen"` // Default logging level is "InfoLevel" so to enable the debug log set the "LogLevel" to "DebugLevel". LoggingLevel string `json:"logging_level"` EncryptionConfig json.RawMessage `json:"encryption_config"` // Configs for subsystems Cluster json.RawMessage `json:"cluster_config"` // Config for database store StoreConfig json.RawMessage `json:"store_config"` // Config to expose runtime stats VarzPath string `json:"varz_path"` }
Config represents main configuration.
func (*Config) Encryption ¶
func (c *Config) Encryption(encrConfig json.RawMessage) EncryptionConfig
func (*Config) Store ¶
func (c *Config) Store(storeConfig json.RawMessage) StoreConfig
type EncryptionConfig ¶
type EncryptionConfig struct { // chacha20poly1305 encryption key for client Ids and topic keys. 32 random bytes base64-encoded. Key string `json:"key,omitempty"` // Key identifier. it is useful when you use multiple keys. Identifier string `json:"identifier"` // slealed flag tells if key in the configuration is sealed. Sealed bool `json:"slealed"` // timestamp is helpful to determine the latest key in case of keyroll over. Timestamp uint32 `json:"timestamp,omitempty"` }
EncryptionConfig represents the configuration for the encryption.
type StoreConfig ¶
type StoreConfig struct { // clean cleans logs to start clean and reset message store on service restart CleanSession bool `json:"clean_session"` }
StoreConfig represents the configuration for the store.
Click to show internal directories.
Click to hide internal directories.