Documentation ¶
Overview ¶
支持https+grpc的共享端口版,不需要ca证书 获取http+grpc,两个服务必须独立端口 Usage: 如果是grpc+https s, err := server.NewServer(hfw.Config.Server, opt...) RegisterHelloServiceServer(s, &HelloServiceImpl{auth: auth.NewAuthWithHTTPS("value")}) 如果是http+grpc s, err := server.NewServer(hfw.Config.Server, opt...) RegisterHelloServiceServer(s, &HelloServiceImpl{auth: auth.NewAuth("value")}) go server.StartServer(s, ":1234")
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewServer ¶
func NewServer(serverConfig configs.ServerConfig, opt ...grpc.ServerOption) (*grpc.Server, error)
Types ¶
type ServerCreds ¶
func (*ServerCreds) GetCredentials ¶
func (t *ServerCreds) GetCredentials() (credentials.TransportCredentials, error)
func (*ServerCreds) GetCredentialsByCA ¶
func (t *ServerCreds) GetCredentialsByCA() (credentials.TransportCredentials, error)
func (*ServerCreds) GetTLSCredentials ¶
func (t *ServerCreds) GetTLSCredentials() (credentials.TransportCredentials, error)
Click to show internal directories.
Click to hide internal directories.