mesos

package
v0.0.0-...-c0686e8 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2022 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Overview

Package mesos is copied from mesos-uns-bridge/mesos/detector.go with modifications : 1) refer to forked mesos-go dependencies

Index

Constants

View Source
const (
	// ServiceName for mesos scheduler
	ServiceName = "Scheduler"
)

Variables

This section is empty.

Functions

func GetAuthHeader

func GetAuthHeader(config *Config, secretPath string) (http.Header, error)

GetAuthHeader returns necessary auth header used for HTTP request.

func InitManager

func InitManager(
	d *yarpc.Dispatcher,
	mesosConfig *Config,
	store storage.FrameworkInfoStore)

InitManager initializes the mesosManager

Types

type Config

type Config struct {
	Framework *FrameworkConfig `yaml:"framework"`
	ZkPath    string           `yaml:"zk_path"`
	Encoding  string           `yaml:"encoding"`
}

Config for Mesos specific configuration

type FrameworkConfig

type FrameworkConfig struct {
	User                        string  `yaml:"user"`
	Name                        string  `yaml:"name"`
	Role                        string  `yaml:"role"`
	Principal                   string  `yaml:"principal"`
	FailoverTimeout             float64 `yaml:"failover_timeout"`
	GPUSupported                bool    `yaml:"gpu_supported"`
	TaskKillingStateSupported   bool    `yaml:"task_killing_state"`
	PartitionAwareSupported     bool    `yaml:"partition_aware"`
	RevocableResourcesSupported bool    `yaml:"revocable_resources"`
	MaxConnectionsToMesosMaster int     `yaml:"max_connections_to_mesos_master"`
}

FrameworkConfig for framework specific configuration

type FrameworkInfoProvider

type FrameworkInfoProvider interface {
	GetMesosStreamID(ctx context.Context) string
	GetFrameworkID(ctx context.Context) *mesos.FrameworkID
}

FrameworkInfoProvider can be used to retrieve mesosStreamID and frameworkID.

type MasterDetector

type MasterDetector interface {
	mhttp.LeaderDetector
}

MasterDetector is the interface for finding where is an active Mesos master.

func NewZKDetector

func NewZKDetector(zkPath string) (MasterDetector, error)

NewZKDetector creates a new MasterDetector which caches last detected leader.

type SchedulerDriver

type SchedulerDriver interface {
	mhttp.MesosDriver
	FrameworkInfoProvider
}

SchedulerDriver extends the Mesos HTTP Driver API.

func GetSchedulerDriver

func GetSchedulerDriver() SchedulerDriver

GetSchedulerDriver return the interface to SchedulerDriver.

func InitSchedulerDriver

func InitSchedulerDriver(
	cfg *Config,
	store storage.FrameworkInfoStore,
	defaultHeaders http.Header) SchedulerDriver

InitSchedulerDriver initialize Mesos scheduler driver for Mesos scheduler HTTP API.

Directories

Path Synopsis
*
detector
The detector package houses implementation of master detectors.
The detector package houses implementation of master detectors.
detector/zoo
Zookeeper-based mesos-master leaderhip detection.
Zookeeper-based mesos-master leaderhip detection.
upid
Package upid defines the UPID type and some utilities of the UPID.
Package upid defines the UPID type and some utilities of the UPID.
yarpc

Jump to

Keyboard shortcuts

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