fake_gordon

package
v0.0.0-...-3681ca5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 13, 2014 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CopiedIn

type CopiedIn struct {
	Handle string
	Src    string
	Dst    string
}

type CopiedOut

type CopiedOut struct {
	Handle string
	Src    string
	Dst    string
	Owner  string
}

type CopyInCallback

type CopyInCallback func(CopiedIn) error

type CopyOutCallback

type CopyOutCallback func(CopiedOut) error

type DiskLimit

type DiskLimit struct {
	Handle string
	Limits gordon.DiskLimits
}

type FakeGordon

type FakeGordon struct {
	Connected    bool
	ConnectError error

	CreateError error

	StopError error

	DestroyError error

	SpawnError error

	LinkError error

	NetInError error

	GetMemoryLimitError error

	GetDiskLimitError error

	AttachError error
	// contains filtered or unexported fields
}

func New

func New() *FakeGordon

func (*FakeGordon) Attach

func (f *FakeGordon) Attach(handle string, jobID uint32) (<-chan *warden.ProcessPayload, error)

func (*FakeGordon) CPULimits

func (f *FakeGordon) CPULimits() []Limit

func (*FakeGordon) Connect

func (f *FakeGordon) Connect() error

func (*FakeGordon) CopyIn

func (f *FakeGordon) CopyIn(handle, src, dst string) (*warden.CopyInResponse, error)

func (*FakeGordon) CopyOut

func (f *FakeGordon) CopyOut(handle, src, dst, owner string) (*warden.CopyOutResponse, error)

func (*FakeGordon) Create

func (f *FakeGordon) Create(properties map[string]string) (*warden.CreateResponse, error)

func (*FakeGordon) CreatedHandles

func (f *FakeGordon) CreatedHandles() []string

func (*FakeGordon) CreatedProperties

func (f *FakeGordon) CreatedProperties(handle string) map[string]string

func (*FakeGordon) Destroy

func (f *FakeGordon) Destroy(handle string) (*warden.DestroyResponse, error)

func (*FakeGordon) DestroyedHandles

func (f *FakeGordon) DestroyedHandles() []string

func (*FakeGordon) DiskLimits

func (f *FakeGordon) DiskLimits() []DiskLimit

func (*FakeGordon) GetDiskLimit

func (f *FakeGordon) GetDiskLimit(handle string) (uint64, error)

func (*FakeGordon) GetMemoryLimit

func (f *FakeGordon) GetMemoryLimit(handle string) (uint64, error)

func (*FakeGordon) Info

func (f *FakeGordon) Info(handle string) (*warden.InfoResponse, error)

func (*FakeGordon) LimitCPU

func (f *FakeGordon) LimitCPU(handle string, limitInShares uint64) (*warden.LimitCpuResponse, error)

func (*FakeGordon) LimitDisk

func (f *FakeGordon) LimitDisk(handle string, limits gordon.DiskLimits) (*warden.LimitDiskResponse, error)

func (*FakeGordon) LimitMemory

func (f *FakeGordon) LimitMemory(handle string, limit uint64) (*warden.LimitMemoryResponse, error)

func (*FakeGordon) List

func (f *FakeGordon) List(filterProperties map[string]string) (*warden.ListResponse, error)

func (*FakeGordon) MemoryLimits

func (f *FakeGordon) MemoryLimits() []Limit

func (*FakeGordon) NetIn

func (f *FakeGordon) NetIn(handle string) (*warden.NetInResponse, error)

func (*FakeGordon) Reset

func (f *FakeGordon) Reset()

func (*FakeGordon) Run

func (f *FakeGordon) Run(handle string, script string, resourceLimits gordon.ResourceLimits, environmentVariables []gordon.EnvironmentVariable) (uint32, <-chan *warden.ProcessPayload, error)

func (*FakeGordon) ScriptsThatRan

func (f *FakeGordon) ScriptsThatRan() []*RunningScript

func (*FakeGordon) SetCopyInErr

func (f *FakeGordon) SetCopyInErr(err error)

func (*FakeGordon) SetCopyOutErr

func (f *FakeGordon) SetCopyOutErr(err error)

func (*FakeGordon) SetCopyOutFileContent

func (f *FakeGordon) SetCopyOutFileContent(data []byte)

func (*FakeGordon) SetInfoError

func (f *FakeGordon) SetInfoError(err error)

func (*FakeGordon) SetInfoResponse

func (f *FakeGordon) SetInfoResponse(response *warden.InfoResponse)

func (*FakeGordon) SetLimitCPUError

func (f *FakeGordon) SetLimitCPUError(err error)

func (*FakeGordon) SetLimitDiskError

func (f *FakeGordon) SetLimitDiskError(err error)

func (*FakeGordon) SetLimitMemoryError

func (f *FakeGordon) SetLimitMemoryError(err error)

func (*FakeGordon) SetRunReturnValues

func (f *FakeGordon) SetRunReturnValues(processID uint32, processPayloadChan <-chan *warden.ProcessPayload, err error)

func (*FakeGordon) Stop

func (f *FakeGordon) Stop(handle string, background, kill bool) (*warden.StopResponse, error)

func (*FakeGordon) StoppedHandles

func (f *FakeGordon) StoppedHandles() []string

func (*FakeGordon) ThingsCopiedIn

func (f *FakeGordon) ThingsCopiedIn() []*CopiedIn

func (*FakeGordon) ThingsCopiedOut

func (f *FakeGordon) ThingsCopiedOut() []*CopiedOut

func (*FakeGordon) WhenCopyingIn

func (f *FakeGordon) WhenCopyingIn(copiedIn CopiedIn, callback CopyInCallback)

func (*FakeGordon) WhenCopyingOut

func (f *FakeGordon) WhenCopyingOut(copiedOut CopiedOut, callback CopyOutCallback)

func (*FakeGordon) WhenListing

func (f *FakeGordon) WhenListing(callback ListCallback)

func (*FakeGordon) WhenRunning

func (f *FakeGordon) WhenRunning(handle string, script string, resourceLimits gordon.ResourceLimits, environmentVariables []gordon.EnvironmentVariable, callback RunCallback)

type Limit

type Limit struct {
	Handle string
	Limit  uint64
}

type ListCallback

type ListCallback func(filterProperties map[string]string) (*warden.ListResponse, error)

type RunCallback

type RunCallback func() (uint32, <-chan *warden.ProcessPayload, error)

type RunningScript

type RunningScript struct {
	Handle               string
	Script               string
	ResourceLimits       gordon.ResourceLimits
	EnvironmentVariables []gordon.EnvironmentVariable
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL