github.com/clubpay/ronykit/kit@v0.14.4-0.20240515065620-d0dace45cbc7/edge_prefork.go (about) 1 package kit 2 3 import ( 4 "os" 5 6 "github.com/clubpay/ronykit/kit/utils" 7 ) 8 9 const envForkChildKey = "RONYKIT_FORK_CHILD" 10 11 // we are in the parent process 12 type child struct { 13 pid int 14 err error 15 } 16 17 // childID determines if the current process is a child process 18 func childID() int { 19 return utils.StrToInt(os.Getenv(envForkChildKey)) 20 }