kite icon indicating copy to clipboard operation
kite copied to clipboard

Does kite have its own client connection pool? Need to implement it myself? Is there a simple demo?

Open aapelismith opened this issue 7 years ago • 1 comments

Does kite have its own client connection pool? Need to implement it myself? Is there a simple demo?

var captchaPoll *sync.Pool = &sync.Pool{
	New: func() interface{} {
		k := ku.NewClient("http://localhost:3636/kite")
		k.Dial()
		return k
	},
}

aapelismith avatar Dec 21 '18 06:12 aapelismith

This is my own connection pool. He is so simple and clumsy. I want to know if there is any best way to implement this connection pool.

package main
import (
    "github.com/koding/kite"
    "sync"
)
var userSrvPoll *sync.Pool = &sync.Pool{
	New: func() interface{} {
		k := k.NewClient("http://localhost:3636/kite")
		k.Dial()
		return k
	},
}

aapelismith avatar Dec 21 '18 06:12 aapelismith