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

	result := C.newrelic_request_shutdown(cReason)
	return int(result)
}
Пример #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")
}
Пример #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))
}