Remove controlplanerpc.NewClient (superseded by NewRPCClient), Loader.Overlay (-config-overlay reaches Resolve directly), and setup.Run (RunParams is the live entry point). Move ResolverFunc into a test file, since only tests adapt functions to the egress Resolver.
11 lines
315 B
Go
11 lines
315 B
Go
package egress
|
|
|
|
import "context"
|
|
|
|
// ResolverFunc adapts a function to Resolver for tests.
|
|
type ResolverFunc func(ctx context.Context, credential, service string) (string, error)
|
|
|
|
func (f ResolverFunc) Resolve(ctx context.Context, credential, service string) (string, error) {
|
|
return f(ctx, credential, service)
|
|
}
|