コード例 #1
0
ファイル: stats.go プロジェクト: vsukhin/deferclient
// NewClient instantiates and returns a new client
func NewClient(token string) *Client {

	ds := &Client{
		statsFrequency: 60,
		statsUrl:       deferclient.ApiBase + "/stats/create",
		GrabGC:         true,
		GrabMem:        true,
		GrabGR:         true,
		GrabCgo:        true,
		GrabFd:         true,
		GrabHTTP:       true,
		Verbose:        false,
		Token:          token,
		environment:    "production",
		appGroup:       "default",
		noPost:         false,
	}

	ds.BaseClient = deferclient.NewDeferPanicClient(token)
	ds.BaseClient.Environment = ds.environment
	ds.BaseClient.AppGroup = ds.appGroup
	ds.BaseClient.NoPost = ds.noPost

	return ds
}
コード例 #2
0
ファイル: kv.go プロジェクト: akashshinde/deferclient
// NewClient instantiates and returns a new client
func NewClient(token string) *Client {

	ds := &Client{
		kvUrl:       deferclient.ApiBase + "/kvs/create",
		Token:       token,
		environment: "production",
		appGroup:    "default",
	}

	ds.BaseClient = deferclient.NewDeferPanicClient(ds.Token)
	ds.BaseClient.Environment = ds.environment
	ds.BaseClient.AppGroup = ds.appGroup

	return ds
}