Add a struct for signer config

We can use a struct of config to hold all the necessary info that needed
to run a notary signer.

Signed-off-by: Hu Keping <hukeping@huawei.com>
This commit is contained in:
HuKeping 2016-04-10 10:48:43 +08:00
parent 4d85f964bc
commit ba324344ed
1 changed files with 10 additions and 0 deletions

View File

@ -1,6 +1,8 @@
package signer
import (
"crypto/tls"
pb "github.com/docker/notary/proto"
"github.com/docker/notary/tuf/signed"
)
@ -33,3 +35,11 @@ type KeyManager interface {
type Signer interface {
Sign(request *pb.SignatureRequest) (*pb.Signature, error)
}
// Config tells how to configure a notary-signer
type Config struct {
HTTPAddr string
GRPCAddr string
TLSConfig *tls.Config
CryptoServices CryptoServiceIndex
}