istio

package module
v0.0.0-...-5a92c22 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 10, 2022 License: MIT Imports: 11 Imported by: 3

README

istio

通用istio处理

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetHTTPForwardHeadergo

func GetHTTPForwardHeadergo(req *http.Request) http.Header

GetHTTPForwardHeadergo 获取Http跟踪Header

Types

type GrpcClient

type GrpcClient struct {
	Log log.Logger
	// contains filtered or unexported fields
}

GrpcClient grpc客户端

func NewGrpcClient

func NewGrpcClient(serviceName string, port int, streamClientInterceptors []grpc.StreamClientInterceptor, unaryClientInterceptors []grpc.UnaryClientInterceptor) *GrpcClient

NewGrpcClient 创建Grpc客户端

func (*GrpcClient) Close

func (c *GrpcClient) Close()

Close 关闭

func (*GrpcClient) GetConn

func (c *GrpcClient) GetConn() *grpc.ClientConn

GetConn 获取客户端连接

type GrpcServer

type GrpcServer struct {
	Log log.Logger
	// contains filtered or unexported fields
}

GrpcServer 服务端

func NewGrpcServer

func NewGrpcServer(name string, address string, streamServerInterceptors []grpc.StreamServerInterceptor, unaryServerInterceptors []grpc.UnaryServerInterceptor) *GrpcServer

NewGrpcServer 创建Grpc服务端

func (*GrpcServer) GetSrv

func (s *GrpcServer) GetSrv() *grpc.Server

GetSrv 获取rpc server

func (*GrpcServer) Run

func (s *GrpcServer) Run()

Run ...

func (*GrpcServer) Start

func (s *GrpcServer) Start()

Start 启动

func (*GrpcServer) Stop

func (s *GrpcServer) Stop()

Stop ...

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL