Configuration
public class Configuration
Configuration options for Coaty container components, such as controllers, communication manager, and runtime.
Warning
Configuration objects do not need to conform to JSON format as opposed to the Coaty JS framework!!-
Common options shared by container components (optional).
Declaration
Swift
public var common: CommonOptions?
-
Options used for communication.
Declaration
Swift
public var communication: CommunicationOptions
-
Controller configuration options (optional).
Declaration
Swift
public var controllers: ControllerConfig?
-
Options used to connect to databases (optional).
Declaration
Swift
public var databases: DatabaseOptions?
-
Create a new configuration instance with the given options.
Declaration
Swift
public init(common: CommonOptions? = nil, communication: CommunicationOptions, controllers: ControllerConfig? = nil, databases: DatabaseOptions? = nil)
-
Builds a new
Configuration
using the convenience closure syntax.Declaration
Swift
public static func build(_ closure: (ConfigurationBuilder) -> ()) throws -> Configuration
Parameters
closure
the builder closure, preferably used as trailing closure.
Return Value
Configuration configured using the builder.