monitor

package
v0.0.0-...-34cf9b4 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2018 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StatusLabel = "io.boss/restart.status"
	// custom boss status
	DeleteStatus containerd.ProcessStatus = "delete"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Monitor

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

func New

func New(client *containerd.Client, register Register, networks map[config.NetworkType]Network) *Monitor

New returns a new monitor for containers

func (*Monitor) Attach

func (m *Monitor) Attach() error

func (*Monitor) Run

func (m *Monitor) Run(interval time.Duration)

func (*Monitor) Shutdown

func (m *Monitor) Shutdown()

func (*Monitor) Stop

func (m *Monitor) Stop()

type Network

type Network interface {
	Create(containerd.Task) (string, error)
	Remove(containerd.Container) error
}

type Register

type Register interface {
	Register(id, name, ip string, s config.Service) error
	Deregister(id string) error
	EnableMaintainance(id, msg string) error
	DisableMaintainance(id string) error
}

Register is an object that registers and manages service information in its backend

Jump to

Keyboard shortcuts

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