2020-04-10 03:05:46 +03:00
|
|
|
package verrpc
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
|
|
|
|
"github.com/lightningnetwork/lnd/lnrpc"
|
|
|
|
)
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
subServer := &lnrpc.SubServerDriver{
|
|
|
|
SubServerName: subServerName,
|
2021-01-29 17:49:48 +03:00
|
|
|
NewGrpcHandler: func() lnrpc.GrpcHandler {
|
|
|
|
return &ServerShell{}
|
2020-04-10 03:05:46 +03:00
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
// We'll register ourselves as a sub-RPC server within the global lnrpc
|
|
|
|
// package namespace.
|
|
|
|
if err := lnrpc.RegisterSubServer(subServer); err != nil {
|
|
|
|
panic(fmt.Sprintf("failed to register sub server driver '%s': %v",
|
|
|
|
subServerName, err))
|
|
|
|
}
|
|
|
|
}
|