mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-11-01 14:22:17 +00:00
fix godeps
This commit is contained in:
34
vendor/github.com/mesos/mesos-go/mesosutil/process/process.go
generated
vendored
34
vendor/github.com/mesos/mesos-go/mesosutil/process/process.go
generated
vendored
@@ -1,34 +0,0 @@
|
||||
package process
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"sync"
|
||||
)
|
||||
|
||||
var (
|
||||
pidLock sync.Mutex
|
||||
pid uint64
|
||||
)
|
||||
|
||||
func nextPid() uint64 {
|
||||
pidLock.Lock()
|
||||
defer pidLock.Unlock()
|
||||
pid++
|
||||
return pid
|
||||
}
|
||||
|
||||
//TODO(jdef) add lifecycle funcs
|
||||
//TODO(jdef) add messaging funcs
|
||||
type Process struct {
|
||||
label string
|
||||
}
|
||||
|
||||
func New(kind string) *Process {
|
||||
return &Process{
|
||||
label: fmt.Sprintf("%s(%d)", kind, nextPid()),
|
||||
}
|
||||
}
|
||||
|
||||
func (p *Process) Label() string {
|
||||
return p.label
|
||||
}
|
||||
Reference in New Issue
Block a user