mesos

package
v0.3.2-rc1 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2017 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

type Agent struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewAgent

func NewAgent(id, hostname string, attrs []*mesosproto.Attribute) *Agent

func (*Agent) AddOffer

func (s *Agent) AddOffer(offer *Offer)

func (*Agent) Attributes

func (s *Agent) Attributes() map[string]string

func (*Agent) Empty

func (s *Agent) Empty() bool

func (*Agent) GetOffer

func (s *Agent) GetOffer(offerId string) *Offer

func (*Agent) GetOffers

func (s *Agent) GetOffers() []*Offer

func (*Agent) ID

func (s *Agent) ID() string

func (*Agent) MarshalJSON

func (s *Agent) MarshalJSON() ([]byte, error)

func (*Agent) RemoveOffer

func (s *Agent) RemoveOffer(offerID string) bool

func (*Agent) Resources

func (s *Agent) Resources() (cpus, mem, disk float64, ports []uint64)

type Offer

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

func NewOffer

func NewOffer(offer *mesosproto.Offer) *Offer

func (*Offer) GetAgentId

func (f *Offer) GetAgentId() string

func (*Offer) GetAttrs

func (f *Offer) GetAttrs() map[string]string

func (*Offer) GetCpus

func (f *Offer) GetCpus() float64

func (*Offer) GetDisk

func (f *Offer) GetDisk() float64

func (*Offer) GetHostname

func (f *Offer) GetHostname() string

func (*Offer) GetId

func (f *Offer) GetId() string

func (*Offer) GetMem

func (f *Offer) GetMem() float64

func (*Offer) GetPortRange

func (f *Offer) GetPortRange() (ranges []string)

func (*Offer) GetPorts

func (f *Offer) GetPorts() (ports []uint64)

func (*Offer) MarshalJSON

func (f *Offer) MarshalJSON() ([]byte, error)

Jump to

Keyboard shortcuts

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