NOTE - An updated and more complete example can be found here.
Here's acl.json
:
{
package main | |
import ( | |
"log" | |
"github.com/hashicorp/consul/api" | |
) | |
func main() { | |
client, err := api.NewClient(api.DefaultConfig()) |
NOTE - An updated and more complete example can be found here.
Here's acl.json
:
{
#include <stdlib.h> | |
#include <sys/resource.h> | |
int main() { | |
struct rlimit limit; | |
limit.rlim_cur = 4096; | |
limit.rlim_max = 4096; | |
int ret; | |
ret = prlimit(18048, RLIMIT_NOFILE, &limit, NULL); |
goroutine profile: total 1272 | |
1131 @ 0x42d6ec 0x42d7de 0x43ed74 0x43e999 0x473b79 0xa287a1 0xf2a44f 0xf2f72d 0xf78b28 0xf72c65 0xf71685 0x684dc4 0x686580 0x687af4 0x683c9d 0x45ce61 | |
# 0x43e998 sync.runtime_Semacquire+0x38 /goroot/src/runtime/sema.go:56 | |
# 0x473b78 sync.(*RWMutex).RLock+0x48 /goroot/src/sync/rwmutex.go:50 | |
# 0xa287a0 github.com/hashicorp/consul/agent/local.(*State).Stats+0x50 /gopath/src/github.com/hashicorp/consul/agent/local/state.go:567 | |
# 0xf2a44e github.com/hashicorp/consul/agent.(*Agent).Stats+0x21e /gopath/src/github.com/hashicorp/consul/agent/agent.go:2049 | |
# 0xf2f72c github.com/hashicorp/consul/agent.(*HTTPServer).AgentSelf+0x3ac /gopath/src/github.com/hashicorp/consul/agent/agent_endpoint.go:75 | |
# 0xf78b27 github.com/hashicorp/consul/agent.(*HTTPServer).AgentSelf-fm+0x47 /gopath/src/github.com/hashicorp/consul/agent/http.go:101 | |
# 0xf72c64 github.com/hashicorp/consul/agent.(*HTTPServer).wrap.func1+0x664 /gopath/src/github.com/hashicorp/consul/agent/http.go:272 | |
# 0xf71684 githu |