Make PKI data and RunnerFactory public objects (#865)

* Make PKI data and RunnerFactory public objects

* removes unnecessary nullRunner object

* renames secure factory to point out MTLS
This commit is contained in:
Gerardo Viedma
2018-03-16 15:40:58 +00:00
committed by GitHub
parent 62de4a5c9a
commit 1cae6f988e
3 changed files with 15 additions and 36 deletions

View File

@@ -21,6 +21,15 @@ type RunnerPool interface {
Shutdown(context.Context) error
}
type PKIData struct {
Ca string
Key string
Cert string
}
// MTLSRunnerFactory represents a factory method for constructing runners using mTLS
type MTLSRunnerFactory func(addr string, pki *PKIData) (Runner, error)
// Runner is the interface to invoke the execution of a function call on a specific runner
type Runner interface {
TryExec(ctx context.Context, call RunnerCall) (bool, error)