func RequestShutdown(reason string) int {
	cReason := C.CString(reason)
	defer C.free(unsafe.Pointer(cReason))

	result := C.newrelic_request_shutdown(cReason)
	return int(result)
}
Exemplo n.º 2
0
func RequestShutdown(reason string) error {
	ptr := C.CString(reason)
	defer C.free(unsafe.Pointer(ptr))
	rv := C.newrelic_request_shutdown(ptr)
	return nrError(rv, "request shutdown")
}
Exemplo n.º 3
0
/**
 * Tell the CollectorClient to shutdown and stop reporting application
 * performance data to New Relic.
 *
 * @reason reason for shutdown request
 * @return  0 on success, error code on error, else warning code
 */
func RequestShutdown(reason string) (int, error) {
	creason := C.CString(reason)
	defer C.free(unsafe.Pointer(creason))
	return errNo(C.newrelic_request_shutdown(creason))
}