2021-01-13 09:06:45 +03:00
|
|
|
package service
|
|
|
|
|
|
|
|
import (
|
2021-10-26 23:32:16 +03:00
|
|
|
"go.unistack.org/micro/v3/client"
|
|
|
|
"go.unistack.org/micro/v3/config"
|
2021-01-13 09:06:45 +03:00
|
|
|
)
|
|
|
|
|
|
|
|
type clientKey struct{}
|
|
|
|
|
|
|
|
// Client to call config service
|
|
|
|
func Client(c client.Client) config.Option {
|
|
|
|
return config.SetOption(clientKey{}, c)
|
|
|
|
}
|
|
|
|
|
|
|
|
type serviceKey struct{}
|
|
|
|
|
|
|
|
// Service to which data load
|
|
|
|
func Service(s string) config.Option {
|
|
|
|
return config.SetOption(serviceKey{}, s)
|
|
|
|
}
|