go-micro.dev/v5@v5.12.0/config/loader/memory/options.go (about) 1 package memory 2 3 import ( 4 "go-micro.dev/v5/config/loader" 5 "go-micro.dev/v5/config/reader" 6 "go-micro.dev/v5/config/source" 7 ) 8 9 // WithSource appends a source to list of sources. 10 func WithSource(s source.Source) loader.Option { 11 return func(o *loader.Options) { 12 o.Source = append(o.Source, s) 13 } 14 } 15 16 // WithReader sets the config reader. 17 func WithReader(r reader.Reader) loader.Option { 18 return func(o *loader.Options) { 19 o.Reader = r 20 } 21 } 22 23 func WithWatcherDisabled() loader.Option { 24 return func(o *loader.Options) { 25 o.WithWatcherDisabled = true 26 } 27 }