Documentation ¶
Index ¶
- func Duration(seconds float64) time.Duration
- func FindLabel(labels []mesos.Label, key string) *mesos.Label
- func GetLabelKeysByValue(labels []mesos.Label, value string) []string
- type HTTPCheck
- type HealthCheck
- type HealthCheckType
- type TaskID
- type TaskInfo
- func (h TaskInfo) FindEnvValue(key string) string
- func (h TaskInfo) FindLabel(key string) *mesos.Label
- func (h TaskInfo) GetFirstPortWithLabel(portLabel string) (*mesos.Port, error)
- func (h TaskInfo) GetHealthCheck() (check HealthCheck)
- func (h TaskInfo) GetLabelKeysByValue(value string) []string
- func (h TaskInfo) GetLabelValue(key string) string
- func (h TaskInfo) GetPorts() []mesos.Port
- func (h TaskInfo) GetServiceID() string
- func (h TaskInfo) GetTaskID() TaskID
- func (h TaskInfo) GetWeight() (int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type HTTPCheck ¶ added in v0.9.0
type HTTPCheck struct {
Path string
}
HTTPCheck contains details about HTTP healthcheck
type HealthCheck ¶ added in v0.9.0
type HealthCheck struct { // Type specify healthcheck type Type HealthCheckType // Interval specify how often healthcheck should be performed Interval time.Duration // Timeout specify duration after healtcheck should be aborted and marked as unhealthy Timeout time.Duration // HTTP contains details about heatlhcheck when HTTP Type is set HTTP HTTPCheck }
HealthCheck keeps details how to check task health
type HealthCheckType ¶ added in v0.9.0
type HealthCheckType int
HealthCheckType is type of healthcheck
const ( // NONE represents empty healthcheck NONE HealthCheckType = iota // HTTP indicates HTTP field in HealthCheck is configured HTTP // TCP indicates healthcheck is TCP TCP // COMMAND indicates healthcheck is a command COMMAND )
type TaskID ¶ added in v0.9.0
type TaskID string
TaskID is framework-generated ID to distinguish a task
type TaskInfo ¶
TaskInfo is a wrapper over Mesos TaskInfo providing convenient ways to access some of its values
func (TaskInfo) FindEnvValue ¶
FindEnvValue returns the value of an environment variable
func (TaskInfo) GetFirstPortWithLabel ¶ added in v0.11.26
GetFirstPortWithLabel returns port with specified label
func (TaskInfo) GetHealthCheck ¶ added in v0.9.0
func (h TaskInfo) GetHealthCheck() (check HealthCheck)
GetHealthCheck returns
func (TaskInfo) GetLabelKeysByValue ¶
GetLabelKeysByValue returns all keys of labels that contain a given value
func (TaskInfo) GetLabelValue ¶
GetLabelValue returns value for of a label
func (TaskInfo) GetServiceID ¶
GetServiceID extracts service ID from labels in mesos TaskInfo. If it fails to do so, it returns executor ID.