server: grpc hack
This commit is contained in:
parent
de990c1d39
commit
b792245f74
|
@ -47,11 +47,11 @@ type Server struct {
|
||||||
|
|
||||||
// Config configures Server
|
// Config configures Server
|
||||||
type Config struct {
|
type Config struct {
|
||||||
ControlHost, ControlKeyFile string
|
ControlHost, ControlKeyFile string
|
||||||
RethinkDBHost, RethinkDBDatabase string
|
RethinkDBHost, RethinkDBDatabase string
|
||||||
TorDataDir, TorHashedPassword, TorPassword string
|
TorDataDir, TorHashedPassword, TorPassword string
|
||||||
WebPort, DomainSuffix, SSLPort string
|
WebPort, DomainSuffix, SSLPort, GRPCClientPort string
|
||||||
CertKey *[32]byte
|
CertKey *[32]byte
|
||||||
}
|
}
|
||||||
|
|
||||||
// New creates a new Server
|
// New creates a new Server
|
||||||
|
@ -132,6 +132,14 @@ func New(cfg Config) (*Server, error) {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
grpcl, err := net.Listen("tcp", ":"+cfg.GRPCClientPort)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// XXX HACK
|
||||||
|
s.ts.AddAddr(grpcl, nil, "f3724661-af05-41bc-ad99-753b9d631f43")
|
||||||
|
|
||||||
return s, nil
|
return s, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue