constraints

package
v0.0.0-...-24596cf Latest Latest
Warning

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

Go to latest
Published: May 19, 2016 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OfferAttributes

func OfferAttributes(offer *mesos.Offer) map[string]string

func ParseConstraints

func ParseConstraints(rawConstraints [][]string) (map[string][]Constraint, error)

Types

type Cluster

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

func NewClusterConstraint

func NewClusterConstraint(value string) *Cluster

func (*Cluster) Matches

func (c *Cluster) Matches(value string, values []string) bool

func (*Cluster) String

func (c *Cluster) String() string

type Constraint

type Constraint interface {
	Matches(value string, values []string) bool
}

func MustParseConstraint

func MustParseConstraint(value []string) Constraint

func ParseConstraint

func ParseConstraint(value []string) (Constraint, error)

type GroupBy

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

func NewGroupByConstraint

func NewGroupByConstraint(groups int) *GroupBy

func (*GroupBy) Matches

func (g *GroupBy) Matches(value string, values []string) bool

func (*GroupBy) String

func (g *GroupBy) String() string

type Like

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

func NewLikeConstraint

func NewLikeConstraint(regex string) (*Like, error)

func (*Like) Matches

func (l *Like) Matches(value string, values []string) bool

func (*Like) String

func (l *Like) String() string

type Unique

type Unique struct{}

func NewUniqueConstraint

func NewUniqueConstraint() *Unique

func (*Unique) Matches

func (u *Unique) Matches(value string, values []string) bool

func (*Unique) String

func (u *Unique) String() string

type Unlike

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

func NewUnlikeConstraint

func NewUnlikeConstraint(regex string) (*Unlike, error)

func (*Unlike) Matches

func (u *Unlike) Matches(value string, values []string) bool

func (*Unlike) String

func (u *Unlike) String() string

Jump to

Keyboard shortcuts

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