Documentation ¶
Index ¶
Constants ¶
View Source
const ( TCP = "tcp" UDP = "udp" )
Variables ¶
View Source
var GrpcClient = new(Client)
View Source
var GrpcServer = new(Server)
Functions ¶
func RequestSign ¶
Types ¶
type CustomCredential ¶
type CustomCredential struct {
// contains filtered or unexported fields
}
CustomCredential 自定义认证
func NewCustomCredential ¶
func NewCustomCredential(token string) *CustomCredential
func (CustomCredential) GetRequestMetadata ¶
func (c CustomCredential) GetRequestMetadata(ctx context.Context, uri ...string) (map[string]string, error)
GetRequestMetadata 实现自定义认证接口
func (CustomCredential) RequireTransportSecurity ¶
func (c CustomCredential) RequireTransportSecurity() bool
RequireTransportSecurity 自定义认证是否开启TLS
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) RegisterServer ¶
func (g *Server) RegisterServer(register ServerRegister) *Server
type ServerRegister ¶
Click to show internal directories.
Click to hide internal directories.