Documentation ¶
Index ¶
- Constants
- func Destroy()
- func Init(server, hostName string, tls bool, mux uint8, cas []string) error
- func SetUUID(uid string)
- type Client
- type ConnNode
- type ConnQueue
- func (q *ConnQueue) Add(conn *ConnWrapper)
- func (q *ConnQueue) Destroy()
- func (q *ConnQueue) Dial() (*ConnWrapper, error)
- func (q *ConnQueue) GetClient() (proxy.ProxyClient, func() error, error)
- func (q *ConnQueue) GetConn() (*ConnWrapper, func() error, error)
- func (q *ConnQueue) GetConnOutSide() (*ConnWrapper, func() error, error)
- func (q *ConnQueue) Init() error
- type ConnWrapper
- type ConnWrappers
- type Forwarder
- type Params
Constants ¶
View Source
const TransportName = "proxy"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ConnNode ¶
type ConnNode struct { Conn *ConnWrapper Next *ConnNode }
type ConnQueue ¶
type ConnQueue struct { Params *Params Size int Conn ConnWrappers // contains filtered or unexported fields }
func NewConnQueue ¶
func (*ConnQueue) Add ¶ added in v1.7.8
func (q *ConnQueue) Add(conn *ConnWrapper)
func (*ConnQueue) Destroy ¶
func (q *ConnQueue) Destroy()
Destroy force disconnect all the connections
func (*ConnQueue) Dial ¶
func (q *ConnQueue) Dial() (*ConnWrapper, error)
Dial dials new grpc connection with saved params
func (*ConnQueue) GetClient ¶
func (q *ConnQueue) GetClient() (proxy.ProxyClient, func() error, error)
GetClient gets a grpc client from connection
func (*ConnQueue) GetConn ¶
func (q *ConnQueue) GetConn() (*ConnWrapper, func() error, error)
GetConn gets a grpc connection from the pool, also moves the cursor
func (*ConnQueue) GetConnOutSide ¶
func (q *ConnQueue) GetConnOutSide() (*ConnWrapper, func() error, error)
GetConnOutSide gets a connection outside the pool
type ConnWrapper ¶
type ConnWrapper struct { *grpc.ClientConn InUse uint32 }
func NewConnWrapper ¶ added in v1.8.2
func NewConnWrapper(p *Params) (*ConnWrapper, error)
func (*ConnWrapper) Close ¶ added in v1.8.0
func (w *ConnWrapper) Close() error
func (*ConnWrapper) Done ¶
func (w *ConnWrapper) Done() error
func (*ConnWrapper) Use ¶
func (w *ConnWrapper) Use()
type ConnWrappers ¶
type ConnWrappers []*ConnWrapper
func (ConnWrappers) LogStatus ¶ added in v1.7.8
func (w ConnWrappers) LogStatus()
func (ConnWrappers) PickLRU ¶ added in v1.7.8
func (w ConnWrappers) PickLRU() *ConnWrapper
type Forwarder ¶
type Forwarder struct { Ctx context.Context Stream proxy.Proxy_ProxyClient Writer io.Writer Reader io.Reader LocalAddr chan string }
func NewForwarder ¶
func (*Forwarder) CopySRCtoTarget ¶
func (*Forwarder) CopyTargetToSRC ¶
Click to show internal directories.
Click to hide internal directories.