mesos

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2016 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCheck added in v0.3.0

func GetCheck(t *state.Task, cv *CheckVar) *registry.Check

GetCheck()

Build a Check structure from the Task labels

Types

type CacheEntry added in v0.3.0

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

type CheckVar added in v0.3.0

type CheckVar struct {
	Host string
	Port string
}

type Mesos

type Mesos struct {
	Registry registry.Registry
	Agents   map[string]string
	Lock     sync.Mutex

	Leader  *proto.MasterInfo
	Masters []*proto.MasterInfo

	IpOrder []string

	// Whitelist/Blacklist privileges
	TaskPrivilege *Privilege
	FwPrivilege   *Privilege

	Separator string

	ServiceName     string
	ServiceTags     []string
	ServiceIdPrefix string
	// contains filtered or unexported fields
}

func New

func New(c *config.Config) *Mesos

func (*Mesos) LoadCache added in v0.3.0

func (m *Mesos) LoadCache() error

Query the consul agent on the Mesos Master to initialize the cache.

All services created by mesos-consul are prefixed with service-id-prefix flag, followed by a colon.

func (*Mesos) OnMasterChanged added in v0.3.0

func (m *Mesos) OnMasterChanged(leader *proto.MasterInfo)

func (*Mesos) Refresh

func (m *Mesos) Refresh() error

func (*Mesos) RegisterHosts

func (m *Mesos) RegisterHosts(s state.State)

func (*Mesos) UpdatedMasters added in v0.3.0

func (m *Mesos) UpdatedMasters(masters []*proto.MasterInfo)

type MesosHost

type MesosHost struct {
	Ip           string
	Host         string
	Port         int
	PortString   string
	IsLeader     bool
	IsRegistered bool
}

func MasterInfoToMesosHost added in v0.3.0

func MasterInfoToMesosHost(mi *proto.MasterInfo) *MesosHost

func ProtoBufToMesosHost added in v0.3.0

func ProtoBufToMesosHost(mi *proto.MasterInfo) *MesosHost

type Privilege added in v0.4.0

type Privilege struct {
	WhiteList *RegexList
	BlackList *RegexList
}

func NewPrivilege added in v0.4.0

func NewPrivilege(w []string, b []string) *Privilege

func (*Privilege) Allowed added in v0.4.0

func (p *Privilege) Allowed(name string) bool

type RegexList added in v0.4.0

type RegexList struct {
	List  []string
	Regex *regexp.Regexp
}

func NewRegexList added in v0.4.0

func NewRegexList(l []string) *RegexList

func (*RegexList) Compile added in v0.4.0

func (rl *RegexList) Compile(l []string)

func (*RegexList) MatchString added in v0.4.0

func (rl *RegexList) MatchString(s string, def bool) bool

Jump to

Keyboard shortcuts

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