// DefaultConfig provides a default configuration to create a new CLG object by // best effort. func DefaultConfig() Config { newConfig := Config{ // Dependencies. ServiceCollection: service.MustNewCollection(), Log: log.New(log.DefaultConfig()), StorageCollection: storage.MustNewCollection(), } return newConfig }
// DefaultConfig provides a default configuration to create a new network // object by best effort. func DefaultConfig() Config { newConfig := Config{ // Dependencies. Activator: activator.MustNew(), ServiceCollection: service.MustNewCollection(), Forwarder: forwarder.MustNew(), Log: log.New(log.DefaultConfig()), StorageCollection: storage.MustNewCollection(), Tracker: tracker.MustNew(), // Settings. Delay: 0, } return newConfig }
// DefaultConfig provides a default configuration to create a new annad object // by best effort. func DefaultConfig() Config { newServer, err := server.New(server.DefaultConfig()) if err != nil { panic(err) } newConfig := Config{ // Dependencies. Log: log.New(log.DefaultConfig()), Network: network.MustNew(), Server: newServer, ServiceCollection: service.MustNewCollection(), // TODO remove storage collection StorageCollection: storage.MustNewCollection(), // Settings. Flags: Flags{}, Version: version, } return newConfig }