mesoslib

package
v1.0.0-alpha Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2014 License: Apache-2.0 Imports: 14 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MesosLib

type MesosLib struct {
	Log *logrus.Logger
	// contains filtered or unexported fields
}

func NewMesosLib

func NewMesosLib(master string, log *logrus.Logger, frameworkInfo *mesosproto.FrameworkInfo, ip string) *MesosLib

func (*MesosLib) AddEvent

func (m *MesosLib) AddEvent(eventType mesosproto.Event_Type, event *mesosproto.Event) error

func (*MesosLib) FrameworkRegisteredMessage

func (m *MesosLib) FrameworkRegisteredMessage(w http.ResponseWriter, r *http.Request, data []byte) error

Endpoint called by the master upon registration

func (*MesosLib) GetEvent

func (m *MesosLib) GetEvent(kind mesosproto.Event_Type) chan *mesosproto.Event

func (*MesosLib) KillTask

func (m *MesosLib) KillTask(ID string) error

func (*MesosLib) LaunchTask

func (m *MesosLib) LaunchTask(offer *mesosproto.Offer, resources []*mesosproto.Resource, command, ID, image string) error

func (*MesosLib) Metrics

func (m *MesosLib) Metrics() (*Metrics, error)

func (*MesosLib) ReadFile

func (m *MesosLib) ReadFile(taskId string, filenames ...string) (map[string]string, error)

func (*MesosLib) RegisterFramework

func (m *MesosLib) RegisterFramework() error

func (*MesosLib) RequestOffer

func (m *MesosLib) RequestOffer(cpus, mem, disk float64) (*mesosproto.Offer, []*mesosproto.Resource, error)

func (*MesosLib) ResourceOffersMessage

func (m *MesosLib) ResourceOffersMessage(w http.ResponseWriter, r *http.Request, data []byte) error

Endpoint called by the master upon new offers

func (*MesosLib) StatusUpdateMessage

func (m *MesosLib) StatusUpdateMessage(w http.ResponseWriter, r *http.Request, data []byte) error

Endpoint called by the master upon status update

func (*MesosLib) UnRegisterFramework

func (m *MesosLib) UnRegisterFramework() error

type Metrics

type Metrics struct {
	TotalCpus float64 `json:"total_cpus"`
	TotalMem  float64 `json:"total_mem"`
	TotalDisk float64 `json:"total_disk"`
	UsedCpus  float64 `json:"used_cpus"`
	UsedMem   float64 `json:"used_mem"`
	UsedDisk  float64 `json:"used_disk"`
}

Jump to

Keyboard shortcuts

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