github.com/chenbh/concourse/v6@v6.4.2/worker/tsa_config.go (about) 1 package worker 2 3 import ( 4 "github.com/chenbh/concourse/v6/atc" 5 "github.com/chenbh/concourse/v6/tsa" 6 "github.com/concourse/flag" 7 ) 8 9 type TSAConfig struct { 10 Hosts []string `long:"host" default:"127.0.0.1:2222" description:"TSA host to forward the worker through. Can be specified multiple times."` 11 PublicKey flag.AuthorizedKeys `long:"public-key" description:"File containing a public key to expect from the TSA."` 12 WorkerPrivateKey *flag.PrivateKey `long:"worker-private-key" required:"true" description:"File containing the private key to use when authenticating to the TSA."` 13 } 14 15 func (config TSAConfig) Client(worker atc.Worker) *tsa.Client { 16 return &tsa.Client{ 17 Hosts: config.Hosts, 18 HostKeys: config.PublicKey.Keys, 19 PrivateKey: config.WorkerPrivateKey.PrivateKey, 20 Worker: worker, 21 } 22 }