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"
|
2023-08-15 07:43:43 +03:00
|
|
|
"go.unistack.org/micro/v4/options"
|
2021-01-13 09:06:45 +03:00
|
|
|
)
|
|
|
|
|
|
|
|
type clientKey struct{}
|
|
|
|
|
|
|
|
// Client to call config service
|
2023-08-15 07:43:43 +03:00
|
|
|
func Client(c client.Client) options.Option {
|
|
|
|
return options.ContextOption(clientKey{}, c)
|
2021-01-13 09:06:45 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
type serviceKey struct{}
|
|
|
|
|
|
|
|
// Service to which data load
|
2023-08-15 07:43:43 +03:00
|
|
|
func Service(s string) options.Option {
|
|
|
|
return options.ContextOption(serviceKey{}, s)
|
2021-01-13 09:06:45 +03:00
|
|
|
}
|