Documentation
¶
Index ¶
- type ConfigureTransition
- type EnvManager
- func (envs *EnvManager) Configuration(environmentId uuid.UUID) EnvironmentCfg
- func (envs *EnvManager) CreateEnvironment(roles []string) (uuid.UUID, error)
- func (envs *EnvManager) Environment(environmentId uuid.UUID) (env *Environment, err error)
- func (envs *EnvManager) Ids() (keys []uuid.UUID)
- func (envs *EnvManager) TeardownEnvironment(environmentId uuid.UUID) error
- type Environment
- type EnvironmentCfg
- type Range
- type Ranges
- type Role
- func (m Role) GetCommand() (cmd *common.CommandInfo)
- func (m Role) GetHostname() string
- func (m *Role) GetName() string
- func (m Role) GetOfferId() string
- func (m *Role) GetRoleClassName() string
- func (m Role) GetTaskId() string
- func (m *Role) GetWantsCPU() float64
- func (m *Role) GetWantsMemory() float64
- func (m *Role) GetWantsPorts() Ranges
- func (m Role) IsLocked() bool
- type RoleCfg
- type RoleClass
- type RoleManager
- func (m *RoleManager) AcquireRoles(envId uuid.Array, roleNames []string) (err error)
- func (m *RoleManager) ConfigureRoles(envId uuid.Array, roleNames []string) error
- func (m *RoleManager) GetRoleClass(name string) (b *RoleClass)
- func (m *RoleManager) GetRoles() Roles
- func (m *RoleManager) RefreshRoleClasses() (err error)
- func (m *RoleManager) ReleaseRoles(envId uuid.Array, roleNames []string) error
- func (m *RoleManager) RoleCount() int
- func (m *RoleManager) RoleForMesosOffer(offer *mesos.Offer, roleCfg *RoleCfg) (role *Role)
- func (m *RoleManager) TeardownRoles(roleNames []string) error
- type Roles
- type Transition
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigureTransition ¶
type ConfigureTransition struct {
// contains filtered or unexported fields
}
CONFIGURE
type EnvManager ¶
type EnvManager struct {
// contains filtered or unexported fields
}
func NewEnvManager ¶
func NewEnvManager(rm *RoleManager) *EnvManager
func (*EnvManager) Configuration ¶
func (envs *EnvManager) Configuration(environmentId uuid.UUID) EnvironmentCfg
func (*EnvManager) CreateEnvironment ¶
func (envs *EnvManager) CreateEnvironment(roles []string) (uuid.UUID, error)
func (*EnvManager) Environment ¶
func (envs *EnvManager) Environment(environmentId uuid.UUID) (env *Environment, err error)
func (*EnvManager) Ids ¶
func (envs *EnvManager) Ids() (keys []uuid.UUID)
func (*EnvManager) TeardownEnvironment ¶
func (envs *EnvManager) TeardownEnvironment(environmentId uuid.UUID) error
type Environment ¶
func (*Environment) Configuration ¶
func (env *Environment) Configuration() EnvironmentCfg
func (*Environment) CreatedWhen ¶
func (env *Environment) CreatedWhen() time.Time
func (*Environment) CurrentState ¶
func (env *Environment) CurrentState() string
func (*Environment) Id ¶
func (env *Environment) Id() uuid.UUID
func (*Environment) Roles ¶
func (env *Environment) Roles() []string
func (*Environment) TryTransition ¶
func (env *Environment) TryTransition(t Transition) (err error)
type EnvironmentCfg ¶
type EnvironmentCfg struct {
Roles []RoleCfg `json:"roles" binding:"required"`
}
type Role ¶
type Role struct {
// contains filtered or unexported fields
}
func (Role) GetCommand ¶
func (m Role) GetCommand() (cmd *common.CommandInfo)
Returns a consolidated CommandInfo for this Role, based on RoleCfg and RoleClass.
func (Role) GetHostname ¶
func (Role) GetOfferId ¶
func (*Role) GetRoleClassName ¶
func (*Role) GetWantsCPU ¶
func (*Role) GetWantsMemory ¶
func (*Role) GetWantsPorts ¶
type RoleCfg ¶
type RoleManager ¶
type RoleManager struct {
// contains filtered or unexported fields
}
func NewRoleManager ¶
func NewRoleManager(cfgman configuration.Configuration, resourceOffersDone <-chan Roles, rolesToDeploy chan<- map[string]RoleCfg, reviveOffersTrg chan struct{}) *RoleManager
func (*RoleManager) AcquireRoles ¶
func (m *RoleManager) AcquireRoles(envId uuid.Array, roleNames []string) (err error)
func (*RoleManager) ConfigureRoles ¶
func (m *RoleManager) ConfigureRoles(envId uuid.Array, roleNames []string) error
func (*RoleManager) GetRoleClass ¶
func (m *RoleManager) GetRoleClass(name string) (b *RoleClass)
func (*RoleManager) GetRoles ¶
func (m *RoleManager) GetRoles() Roles
func (*RoleManager) RefreshRoleClasses ¶
func (m *RoleManager) RefreshRoleClasses() (err error)
func (*RoleManager) ReleaseRoles ¶
func (m *RoleManager) ReleaseRoles(envId uuid.Array, roleNames []string) error
func (*RoleManager) RoleCount ¶
func (m *RoleManager) RoleCount() int
func (*RoleManager) RoleForMesosOffer ¶
func (m *RoleManager) RoleForMesosOffer(offer *mesos.Offer, roleCfg *RoleCfg) (role *Role)
RoleForMesosOffer accepts a Mesos offer and a RoleCfg and returns a newly constructed Role. This function should only be called by the Mesos scheduler controller when matching role requests with offers (matchRoles). The new role is not assigned to an environment and comes without a roleClass function, as those two are filled out later on by RoleManager.AcquireRoles.
func (*RoleManager) TeardownRoles ¶
func (m *RoleManager) TeardownRoles(roleNames []string) error
type Roles ¶
func (Roles) RolesForBase ¶
type Transition ¶
type Transition interface {
// contains filtered or unexported methods
}
Click to show internal directories.
Click to hide internal directories.