Documentation ¶
Index ¶
- func BindParams(params map[string]string, object interface{}) error
- func FillCloudAccountCredentials(ctx context.Context, cloudAccount *model.CloudAccount, config *steps.Config) error
- func FindOutboundIP() (string, error)
- func GetLogger(w io.Writer) (log *logrus.Logger)
- func GetRandomNode(nodeMap map[string]*node.Node) *node.Node
- func GetWriter(name string) (io.WriteCloser, 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
- type CloudAccountValidator
- type CloudAccountValidatorImpl
- type CountdownLatch
Constants ¶
This section is empty.
Variables ¶
This section is empty.
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 FillCloudAccountCredentials ¶
func FillCloudAccountCredentials(ctx context.Context, 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 FindOutboundIP ¶
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 (validator *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.