Esempio n. 1
0
func newIDService(randomService servicespec.Random) (servicespec.ID, error) {
	newConfig := id.DefaultConfig()
	newConfig.RandomService = randomService
	newService, err := id.New(newConfig)
	if err != nil {
		return nil, maskAny(err)
	}

	return newService, nil
}
Esempio n. 2
0
// DefaultConfig provides a default configuration to create a new CLG
// collection object by best effort.
func DefaultConfig() Config {
	newIDService, err := id.New(id.DefaultConfig())
	if err != nil {
		panic(err)
	}

	newConfig := Config{
		// Dependencies.
		IDService: newIDService,
		Log:       log.New(log.DefaultConfig()),
	}

	return newConfig
}