Documentation ¶
Overview ¶
Package localcluster implements a runner.Cluster using the local machine's docker.
Index ¶
- type Cluster
- func (c *Cluster) Allocate(ctx context.Context, req reflow.Requirements, labels pool.Labels) (alloc pool.Alloc, err error)
- func (c *Cluster) CanAllocate(r reflow.Resources) (bool, error)
- func (c *Cluster) Flags(flags *flag.FlagSet)
- func (c *Cluster) GetName() string
- func (*Cluster) Help() string
- func (c *Cluster) Init(tls tls.Certs, session *session.Session, logger *log.Logger, ...) error
- func (c *Cluster) MaxAlloc() reflow.Resources
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cluster ¶
type Cluster struct { // Pool is the local pool pool.Pool // Log is the logger to write logs out to. Log *log.Logger // Client is the local docker client. Client *docker.Client // Session is the aws session. Session *session.Session // contains filtered or unexported fields }
Cluster implements a cluster abstraction using the local machine.
func (*Cluster) Allocate ¶
func (c *Cluster) Allocate(ctx context.Context, req reflow.Requirements, labels pool.Labels) (alloc pool.Alloc, err error)
Allocate allocates an alloc on the local machine with the specified requirements.
func (*Cluster) CanAllocate ¶
CanAllocate returns whether this cluster can allocate the given amount of resources.
Click to show internal directories.
Click to hide internal directories.