Documentation ¶
Index ¶
- Constants
- Variables
- func AddPool(ctx context.Context, opts AddPoolOptions) error
- func AddTeamsToPool(poolName string, teams []string) error
- func AppendPoolConstraint(c *PoolConstraint) error
- func GetProvisionerForPool(ctx context.Context, name string) (provision.Provisioner, error)
- func MigratePoolTeamsToPoolConstraints() error
- func PoolService() (provisionTypes.PoolService, error)
- func PoolStorage() (provisionTypes.PoolStorage, error)
- func PoolUpdate(ctx context.Context, name string, opts UpdatePoolOptions) error
- func RemovePool(poolName string) error
- func RemoveTeamsFromPool(poolName string, teams []string) error
- func RenamePoolTeam(ctx context.Context, oldName, newName string) error
- func ResetCache()
- func SetPoolConstraint(c *PoolConstraint) error
- func ToConstraintType(value string) (poolConstraintType, error)
- func ValidatePoolService(ctx context.Context, pool string, services []string) error
- type AddPoolOptions
- type Pool
- func GetDefaultPool(ctx context.Context) (*Pool, error)
- func GetPoolByName(ctx context.Context, name string) (*Pool, error)
- func ListAllPools(ctx context.Context) ([]Pool, error)
- func ListPools(ctx context.Context, names ...string) ([]Pool, error)
- func ListPoolsForTeam(ctx context.Context, team string) ([]Pool, error)
- func ListPossiblePools(ctx context.Context, teams []string) ([]Pool, error)
- func ListPublicPools(ctx context.Context) ([]Pool, error)
- func (p *Pool) GetAffinity() (*apiv1.Affinity, error)
- func (p *Pool) GetDefaultPlan() (*appTypes.Plan, error)
- func (p *Pool) GetDefaultRouter() (string, error)
- func (p *Pool) GetPlans() ([]string, error)
- func (p *Pool) GetProvisioner() (provision.Provisioner, error)
- func (p *Pool) GetRouters() ([]string, error)
- func (p *Pool) GetTeams() ([]string, error)
- func (p *Pool) GetVolumePlans() ([]string, error)
- func (p *Pool) MarshalJSON() ([]byte, error)
- func (p *Pool) ValidateRouters(routers []appTypes.AppRouter) error
- type PoolConstraint
- type UpdatePoolOptions
Constants ¶
View Source
const ( ConstraintTypeTeam = poolConstraintType("team") ConstraintTypeRouter = poolConstraintType("router") ConstraintTypeService = poolConstraintType("service") ConstraintTypePlan = poolConstraintType("plan") ConstraintTypeVolumePlan = poolConstraintType("volume-plan") )
Variables ¶
View Source
var ( ErrPublicDefaultPoolCantHaveTeams = errors.New("Public/Default pool can't have teams.") ErrDefaultPoolAlreadyExists = errors.New("Default pool already exists.") ErrPoolNameIsRequired = errors.New("Pool name is required.") ErrPoolNotFound = errors.New("Pool does not exist.") ErrPoolAlreadyExists = errors.New("Pool already exists.") ErrPoolHasNoTeam = errors.New("no team found for pool") ErrPoolHasNoRouter = errors.New("no router found for pool") ErrPoolHasNoService = errors.New("no service found for pool") ErrPoolHasNoPlan = errors.New("no plan found for pool") ErrPoolHasNoVolumePlan = errors.New("no volume-plan found for pool") )
View Source
var (
ErrInvalidConstraintType = errors.Errorf("invalid constraint type. Valid types are: %s", validConstraintTypes)
)
Functions ¶
func AddTeamsToPool ¶
func AppendPoolConstraint ¶
func AppendPoolConstraint(c *PoolConstraint) error
func GetProvisionerForPool ¶
func MigratePoolTeamsToPoolConstraints ¶
func MigratePoolTeamsToPoolConstraints() error
func PoolService ¶
func PoolService() (provisionTypes.PoolService, error)
func PoolStorage ¶
func PoolStorage() (provisionTypes.PoolStorage, error)
func PoolUpdate ¶
func PoolUpdate(ctx context.Context, name string, opts UpdatePoolOptions) error
func RemovePool ¶
func RemoveTeamsFromPool ¶
func ResetCache ¶
func ResetCache()
func SetPoolConstraint ¶
func SetPoolConstraint(c *PoolConstraint) error
func ToConstraintType ¶
Types ¶
type AddPoolOptions ¶
type Pool ¶
type Pool struct { Name string `bson:"_id"` Default bool Provisioner string Labels map[string]string // contains filtered or unexported fields }
func GetPoolByName ¶
GetPoolByName finds a pool by name
func ListPossiblePools ¶
func (*Pool) GetDefaultRouter ¶
func (*Pool) GetProvisioner ¶
func (p *Pool) GetProvisioner() (provision.Provisioner, error)
func (*Pool) GetRouters ¶
func (*Pool) GetVolumePlans ¶
func (*Pool) MarshalJSON ¶
type PoolConstraint ¶
type PoolConstraint struct { PoolExpr string Field poolConstraintType Values []string Blacklist bool }
func ListPoolsConstraints ¶
func ListPoolsConstraints(query bson.M) ([]*PoolConstraint, error)
func (*PoolConstraint) AllowsAll ¶
func (c *PoolConstraint) AllowsAll() bool
Click to show internal directories.
Click to hide internal directories.