healer

package
v0.0.0-...-0cf49f2 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2015 License: BSD-3-Clause Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppLocker

type AppLocker interface {
	Lock(appName string) bool
	Unlock(appName string)
}

type ContainerHealer

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

func NewContainerHealer

func NewContainerHealer(args ContainerHealerArgs) *ContainerHealer

func (*ContainerHealer) RunContainerHealer

func (h *ContainerHealer) RunContainerHealer()

func (*ContainerHealer) Shutdown

func (h *ContainerHealer) Shutdown()

func (*ContainerHealer) String

func (h *ContainerHealer) String() string

type ContainerHealerArgs

type ContainerHealerArgs struct {
	Provisioner         DockerProvisioner
	MaxUnresponsiveTime time.Duration
	Done                chan bool
	Locker              AppLocker
}

type DockerProvisioner

type DockerProvisioner interface {
	container.DockerProvisioner
	MoveOneContainer(container.Container, string, chan error, *sync.WaitGroup, io.Writer, container.AppLocker) container.Container
	MoveContainers(fromHost, toHost string, w io.Writer) error
	HandleMoveErrors(errors chan error, w io.Writer) error
	GetContainer(id string) (*container.Container, error)
	ListContainers(query bson.M) ([]container.Container, error)
}

type HealingEvent

type HealingEvent struct {
	ID               bson.ObjectId `bson:"_id"`
	StartTime        time.Time
	EndTime          time.Time `bson:",omitempty"`
	Action           string
	FailingNode      cluster.Node        `bson:",omitempty"`
	CreatedNode      cluster.Node        `bson:",omitempty"`
	FailingContainer container.Container `bson:",omitempty"`
	CreatedContainer container.Container `bson:",omitempty"`
	Successful       bool
	Error            string `bson:",omitempty"`
}

func ListHealingHistory

func ListHealingHistory(filter string) ([]HealingEvent, error)

func NewHealingEvent

func NewHealingEvent(failing interface{}) (*HealingEvent, error)

func (*HealingEvent) Update

func (evt *HealingEvent) Update(created interface{}, err error) error

type ListHealingHistoryCmd

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

func (*ListHealingHistoryCmd) Flags

func (*ListHealingHistoryCmd) Info

func (c *ListHealingHistoryCmd) Info() *cmd.Info

func (*ListHealingHistoryCmd) Run

func (c *ListHealingHistoryCmd) Run(ctx *cmd.Context, client *cmd.Client) error

type NodeHealer

type NodeHealer struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewNodeHealer

func NewNodeHealer(args NodeHealerArgs) *NodeHealer

func (*NodeHealer) HandleError

func (h *NodeHealer) HandleError(node *cluster.Node) time.Duration

func (*NodeHealer) Shutdown

func (h *NodeHealer) Shutdown()

func (*NodeHealer) String

func (h *NodeHealer) String() string

type NodeHealerArgs

type NodeHealerArgs struct {
	Provisioner           DockerProvisioner
	DisabledTime          time.Duration
	WaitTimeNewMachine    time.Duration
	FailuresBeforeHealing int
}

Jump to

Keyboard shortcuts

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