2021-01-13 09:06:45 +03:00
|
|
|
package service
|
|
|
|
|
|
|
|
import (
|
2023-05-05 20:06:27 +03:00
|
|
|
"go.unistack.org/micro/v4/client"
|
|
|
|
"go.unistack.org/micro/v4/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)
|
|
|
|
}
|