Further consolidate the libraries

This commit is contained in:
Asim Aslam
2019-06-03 18:44:43 +01:00
parent fe060b2d0b
commit b42b6fa0fc
110 changed files with 11934 additions and 83 deletions

21
service/grpc/options.go Normal file
View File

@@ -0,0 +1,21 @@
package grpc
import (
"crypto/tls"
"github.com/micro/go-micro"
gc "github.com/micro/go-plugins/client/grpc"
gs "github.com/micro/go-plugins/server/grpc"
)
// WithTLS sets the TLS config for the service
func WithTLS(t *tls.Config) micro.Option {
return func(o *micro.Options) {
o.Client.Init(
gc.AuthTLS(t),
)
o.Server.Init(
gs.AuthTLS(t),
)
}
}