mirror of https://github.com/docker/docs.git
fixing build errors
This commit is contained in:
parent
99997dc8b3
commit
953d79888a
|
@ -4,7 +4,6 @@ import (
|
||||||
_ "expvar"
|
_ "expvar"
|
||||||
"flag"
|
"flag"
|
||||||
"fmt"
|
"fmt"
|
||||||
"log"
|
|
||||||
"net/http"
|
"net/http"
|
||||||
_ "net/http/pprof"
|
_ "net/http/pprof"
|
||||||
"os"
|
"os"
|
||||||
|
@ -18,6 +17,7 @@ import (
|
||||||
_ "github.com/docker/vetinari/auth/token"
|
_ "github.com/docker/vetinari/auth/token"
|
||||||
"github.com/docker/vetinari/config"
|
"github.com/docker/vetinari/config"
|
||||||
"github.com/docker/vetinari/server"
|
"github.com/docker/vetinari/server"
|
||||||
|
"github.com/docker/vetinari/signer"
|
||||||
)
|
)
|
||||||
|
|
||||||
// DebugAddress is the debug server address to listen on
|
// DebugAddress is the debug server address to listen on
|
||||||
|
@ -54,9 +54,9 @@ func main() {
|
||||||
signal.Notify(sigTerm, syscall.SIGTERM)
|
signal.Notify(sigTerm, syscall.SIGTERM)
|
||||||
|
|
||||||
var trust signed.TrustService
|
var trust signed.TrustService
|
||||||
if conf.TrustServiceConf.Type == "remote" {
|
if conf.TrustService.Type == "remote" {
|
||||||
logrus.Info("[Vetinari Server] : Using remote signing service")
|
logrus.Info("[Vetinari Server] : Using remote signing service")
|
||||||
trust = newRufusSigner(conf.TrustServiceConf.Hostname, conf.TrustServiceConf.Port, conf.TrustServiceConf.TLSCAFile)
|
trust = signer.NewRufusSigner(conf.TrustService.Hostname, conf.TrustService.Port, conf.TrustService.TLSCAFile)
|
||||||
} else {
|
} else {
|
||||||
logrus.Info("[Vetinari Server] : Using local signing service")
|
logrus.Info("[Vetinari Server] : Using local signing service")
|
||||||
trust = signed.NewEd25519()
|
trust = signed.NewEd25519()
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package server
|
package signer
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
|
@ -19,7 +19,7 @@ type RufusSigner struct {
|
||||||
sClient pb.SignerClient
|
sClient pb.SignerClient
|
||||||
}
|
}
|
||||||
|
|
||||||
func newRufusSigner(hostname string, port string, tlscafile string) *RufusSigner {
|
func NewRufusSigner(hostname string, port string, tlscafile string) *RufusSigner {
|
||||||
var opts []grpc.DialOption
|
var opts []grpc.DialOption
|
||||||
netAddr := net.JoinHostPort(hostname, port)
|
netAddr := net.JoinHostPort(hostname, port)
|
||||||
creds, err := credentials.NewClientTLSFromFile(tlscafile, hostname)
|
creds, err := credentials.NewClientTLSFromFile(tlscafile, hostname)
|
Loading…
Reference in New Issue