Documentation ¶
Index ¶
Constants ¶
View Source
const ( // maps a Container.HostPort to the same exact offered host port, ignores .HostPort = 0 StrategyFixed = Strategy("fixed") // same as MappingFixed, except that .HostPort of 0 are mapped to any port offered StrategyWildcard = Strategy("wildcard") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DuplicateError ¶
type DuplicateError struct {
// contains filtered or unexported fields
}
func (*DuplicateError) Error ¶
func (err *DuplicateError) Error() string
type Mapper ¶
type Mapper interface { // Map maps the given pod and the given mesos offer and returns a // slice of port mappings or an error if the mapping failed Map(pod *api.Pod, roles []string, offer *mesos.Offer) ([]Mapping, error) }
Objects implementing the Mapper interface generate port mappings from k8s container ports to ports offered by mesos
type MapperFunc ¶
MapperFunc is a function adapter to the Mapper interface
type Mapping ¶
type Mapping struct { ContainerIdx int // index of the container in the pod spec PortIdx int // index of the port in a container's port spec OfferPort uint64 // the port offered by mesos Role string // the role asssociated with the offered port }
A Mapping represents the mapping between k8s container ports ports offered by mesos. It references the k8s' container and port and specifies the offered mesos port and the offered port's role
func FixedMapper ¶
FixedMapper maps k8s host ports to offered ports ignoring hostPorts == 0 (remaining pod-private)
type PortAllocationError ¶
func (*PortAllocationError) Error ¶
func (err *PortAllocationError) Error() string
Click to show internal directories.
Click to hide internal directories.