Files
micro-config-service/options.go
Vasiliy Tolstov e1b73741be
All checks were successful
test / test (push) Successful in 3m27s
move to micro v4
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2025-03-07 12:52:22 +03:00

21 lines
385 B
Go

package service
import (
"go.unistack.org/micro/v4/client"
"go.unistack.org/micro/v4/config"
)
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)
}