Applifier / go-bloomd

Bloomd client (with connection pool) for Go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build Status Coverage Status GoDoc

go-bloomd

Bloomd (https://github.com/armon/bloomd) client (with connection pool) for Go

$ go get -u github.com/Applifier/go-bloomd

Example

c, _ := bloomd.NewFromAddr("localhost:8673")
defer c.Close()

f, _ := c.CreateFilter(Filter{
	Name: "somefilter",
})

f.Set("foobar")
found, _ := f.Check("foobar")

Client pool

Client pools can be used to maintain a pool of persistent connections to bloomd server

p, _ := bloomd.NewPoolFromAddr(5, 10, "localhost:8673")
c, _ := p.Get()
defer c.Close() // Return client back to pool

f, _ := c.CreateFilter(Filter{
	Name: "somefilter",
})

f.Set("foobar")
found, _ := f.Check("foobar")

About

Bloomd client (with connection pool) for Go

License:MIT License


Languages

Language:Go 99.7%Language:Makefile 0.3%