testutils

package
v0.0.0-...-64a2ea0 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2014 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeCluster

type FakeCluster struct {
	// contains filtered or unexported fields
}

func NewFakeCluster

func NewFakeCluster() *FakeCluster

func (*FakeCluster) AddHost

func (c *FakeCluster) AddHost(id string, h host.Host)

func (*FakeCluster) AddJobs

func (c *FakeCluster) AddJobs(req *host.AddJobsReq) (*host.AddJobsRes, error)

func (*FakeCluster) DialHost

func (c *FakeCluster) DialHost(id string) (cluster.Host, error)

func (*FakeCluster) GetHost

func (c *FakeCluster) GetHost(id string) host.Host

func (*FakeCluster) ListHosts

func (c *FakeCluster) ListHosts() (map[string]host.Host, error)

func (*FakeCluster) RemoveJob

func (c *FakeCluster) RemoveJob(hostID, jobID string, errored bool) error

func (*FakeCluster) SendEvent

func (c *FakeCluster) SendEvent(hostID, event string)

func (*FakeCluster) SetHostClient

func (c *FakeCluster) SetHostClient(id string, h *FakeHostClient)

func (*FakeCluster) SetHosts

func (c *FakeCluster) SetHosts(h map[string]host.Host)

func (*FakeCluster) StreamHostEvents

func (c *FakeCluster) StreamHostEvents(ch chan<- *host.HostEvent) cluster.Stream

type FakeClusterHostEventStream

type FakeClusterHostEventStream struct {
	// contains filtered or unexported fields
}

func (*FakeClusterHostEventStream) Close

func (h *FakeClusterHostEventStream) Close() error

func (*FakeClusterHostEventStream) Err

type FakeHostClient

type FakeHostClient struct {
	// contains filtered or unexported fields
}

func NewFakeHostClient

func NewFakeHostClient(hostID string) *FakeHostClient

func (*FakeHostClient) Attach

func (c *FakeHostClient) Attach(req *host.AttachReq, wait bool) (cluster.ReadWriteCloser, func() error, error)

func (*FakeHostClient) Close

func (c *FakeHostClient) Close() error

func (*FakeHostClient) GetJob

func (c *FakeHostClient) GetJob(id string) (*host.ActiveJob, error)

func (*FakeHostClient) IsStopped

func (c *FakeHostClient) IsStopped(id string) bool

func (*FakeHostClient) ListJobs

func (c *FakeHostClient) ListJobs() (map[string]host.ActiveJob, error)

func (*FakeHostClient) SendEvent

func (c *FakeHostClient) SendEvent(event, id string)

func (*FakeHostClient) SetAttach

func (c *FakeHostClient) SetAttach(id string, rwc cluster.ReadWriteCloser)

func (*FakeHostClient) SetAttachFunc

func (c *FakeHostClient) SetAttachFunc(id string, f attachFunc)

func (*FakeHostClient) StopJob

func (c *FakeHostClient) StopJob(id string) error

func (*FakeHostClient) StreamEvents

func (c *FakeHostClient) StreamEvents(id string, ch chan<- *host.Event) cluster.Stream

type FakeHostEventStream

type FakeHostEventStream struct {
	// contains filtered or unexported fields
}

func (*FakeHostEventStream) Close

func (h *FakeHostEventStream) Close() error

func (*FakeHostEventStream) Err

func (h *FakeHostEventStream) Err() error

Jump to

Keyboard shortcuts

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