Move deps from _workspace/ to vendor/
godep restore pushd $GOPATH/src/github.com/appc/spec git co master popd go get go4.org/errorutil rm -rf Godeps godep save ./... git add vendor git add -f $(git ls-files --other vendor/) git co -- Godeps/LICENSES Godeps/.license_file_state Godeps/OWNERS
This commit is contained in:
42
vendor/github.com/mesos/mesos-go/executor/testing.go
generated
vendored
Normal file
42
vendor/github.com/mesos/mesos-go/executor/testing.go
generated
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
package executor
|
||||
|
||||
import (
|
||||
"github.com/gogo/protobuf/proto"
|
||||
"github.com/mesos/mesos-go/messenger"
|
||||
"github.com/mesos/mesos-go/upid"
|
||||
"golang.org/x/net/context"
|
||||
)
|
||||
|
||||
type TestDriver struct {
|
||||
*MesosExecutorDriver
|
||||
}
|
||||
|
||||
func (e *TestDriver) SetConnected(b bool) {
|
||||
e.guarded(func() {
|
||||
e.connected = b
|
||||
})
|
||||
}
|
||||
|
||||
func (e *TestDriver) SetMessenger(m messenger.Messenger) {
|
||||
e.messenger = m
|
||||
}
|
||||
|
||||
func (e *TestDriver) Started() <-chan struct{} {
|
||||
return e.started
|
||||
}
|
||||
|
||||
func (e *TestDriver) guarded(f func()) {
|
||||
e.lock.Lock()
|
||||
defer e.lock.Unlock()
|
||||
f()
|
||||
}
|
||||
|
||||
func (e *TestDriver) Context() context.Context {
|
||||
return e.context()
|
||||
}
|
||||
|
||||
func (e *TestDriver) StatusUpdateAcknowledgement(ctx context.Context, from *upid.UPID, msg proto.Message) {
|
||||
e.guarded(func() {
|
||||
e.statusUpdateAcknowledgement(ctx, from, msg)
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user