Documentation ¶
Index ¶
- Variables
- func BindParams(params map[string]string, object interface{}) error
- func BootstrapKeys(config *steps.Config) error
- func CreateLBName(clusterID string, isExternal bool) string
- func FillCloudAccountCredentials(cloudAccount *model.CloudAccount, config *steps.Config) error
- func GetLogger(w io.Writer) (log *logrus.Logger)
- func GetRandomNode(nodeMap map[string]*model.Machine) *model.Machine
- func GetWriter(name string) (io.WriteCloser, error)
- func LoadCloudSpecificDataFromKube(k *model.Kube, config *steps.Config) error
- func MakeFileName(taskID string) string
- func MakeKeyName(name string, isUser bool) string
- func MakeNodeName(clusterName string, nodeId string, isMaster bool) string
- func MakeRole(isMaster bool) string
- func RandomString(n int) string
- func UpdateKubeWithCloudSpecificData(k *model.Kube, config *steps.Config)
- type CloudAccountValidator
- type CloudAccountValidatorImpl
- type CountdownLatch
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrInvalidCredentials = errors.New("invalid credentials")
)
Functions ¶
func BindParams ¶
bind params uses json serializing and reflect package that is underneath to avoid direct access to map for getting appropriate field values.
func BootstrapKeys ¶
Create bootstrap key pair and save to config ssh section
func CreateLBName ¶
func FillCloudAccountCredentials ¶
func FillCloudAccountCredentials(cloudAccount *model.CloudAccount, config *steps.Config) error
TODO(stgleb): move getting cloud account outside of this function Gets cloud account from storage and fills config object with those credentials
func MakeFileName ¶
func MakeKeyName ¶
func MakeNodeName ¶ added in v1.0.0
func RandomString ¶
RandomString generates random string with reservoir sampling algorithm https://en.wikipedia.org/wiki/Reservoir_sampling
Types ¶
type CloudAccountValidator ¶
type CloudAccountValidator interface {
ValidateCredentials(cloudAccount *model.CloudAccount) error
}
type CloudAccountValidatorImpl ¶
type CloudAccountValidatorImpl struct {
// contains filtered or unexported fields
}
func NewCloudAccountValidator ¶
func NewCloudAccountValidator() *CloudAccountValidatorImpl
func (*CloudAccountValidatorImpl) ValidateCredentials ¶
func (v *CloudAccountValidatorImpl) ValidateCredentials(cloudAccount *model.CloudAccount) error
type CountdownLatch ¶
type CountdownLatch struct {
// contains filtered or unexported fields
}
func NewCountdownLatch ¶
func NewCountdownLatch(ctx context.Context, count int) *CountdownLatch
func (*CountdownLatch) CountDown ¶
func (c *CountdownLatch) CountDown()
CountDown decrements the counter
func (*CountdownLatch) Wait ¶
func (c *CountdownLatch) Wait()
Wait until count down to zero or if context is done
Click to show internal directories.
Click to hide internal directories.