Documentation
¶
Index ¶
- Variables
- func UploadStringToRemoteFile(content string, host *pb.Host, filename string, owner, group, rights string) error
- type ClusterTarget
- type Feature
- func (f *Feature) Add(t Target, v Variables, s Settings) (Results, error)
- func (f *Feature) Applyable(t Target) bool
- func (f *Feature) BaseFilename() string
- func (f *Feature) Check(t Target, v Variables, s Settings) (Results, error)
- func (f *Feature) DisplayFilename() string
- func (f *Feature) DisplayName() string
- func (f *Feature) Remove(t Target, v Variables, s Settings) (Results, error)
- func (f *Feature) Specs() *viper.Viper
- type HostTarget
- type Installer
- type KongController
- type NodeTarget
- type Results
- func (r Results) AllErrorMessages() string
- func (r Results) ErrorMessagesOfHost(name string) string
- func (r Results) ErrorMessagesOfStep(name string) string
- func (r Results) Keys() []string
- func (r Results) ResultsOfStep(name string) stepResults
- func (r Results) Successful() bool
- func (r Results) Transpose() Results
- type Settings
- type Target
- type Variables
Constants ¶
This section is empty.
Variables ¶
var ( // EmptyValues corresponds to no values for the feature EmptyValues = map[string]interface{}{} )
Functions ¶
Types ¶
type ClusterTarget ¶
type ClusterTarget struct {
// contains filtered or unexported fields
}
ClusterTarget defines a target of type Host, satisfying TargetAPI
func (*ClusterTarget) Installed ¶
func (t *ClusterTarget) Installed() []string
Installed returns a list of installed feature
func (*ClusterTarget) Methods ¶
func (t *ClusterTarget) Methods() map[uint8]Method.Enum
Methods returns a list of packaging managers useable on the target
func (*ClusterTarget) Name ¶
func (t *ClusterTarget) Name() string
Name returns the name of the cluster
func (*ClusterTarget) Type ¶
func (t *ClusterTarget) Type() string
Type returns the type of the Target
type Feature ¶
type Feature struct {
// contains filtered or unexported fields
}
Feature contains the information about an installable feature
func NewFeature ¶
NewFeature searches for a spec file name 'name' and initializes a new Feature object with its content
func (*Feature) Add ¶
Add installs the feature on the target Installs succeeds if error == nil and Results.Successful() is true
func (*Feature) BaseFilename ¶
BaseFilename returns the name of the feature specification file without '.yml'
func (*Feature) Check ¶
Check if feature is installed on target Check is ok if error is nil and Results.Successful() is true
func (*Feature) DisplayFilename ¶
DisplayFilename returns the full file name, with [embedded] added at the end if the feature is embedded.
func (*Feature) DisplayName ¶
DisplayName returns the name of the feature
type HostTarget ¶
type HostTarget struct {
// contains filtered or unexported fields
}
HostTarget defines a target of type Host, satisfying TargetAPI
func (*HostTarget) Installed ¶
func (t *HostTarget) Installed() []string
Installed returns a list of installed features
type Installer ¶
type Installer interface {
// Check checks if the feature is installed
Check(*Feature, Target, Variables, Settings) (Results, error)
// Add executes installation of feature
Add(*Feature, Target, Variables, Settings) (Results, error)
// Remove executes deletion of feature
Remove(*Feature, Target, Variables, Settings) (Results, error)
}
Installer defines the API of an Installer
func NewAptInstaller ¶
func NewAptInstaller() Installer
NewAptInstaller creates a new instance of Installer using script
func NewBashInstaller ¶
func NewBashInstaller() Installer
NewBashInstaller creates a new instance of Installer using script
func NewDcosInstaller ¶
func NewDcosInstaller() Installer
NewDcosInstaller creates a new instance of Installer using DCOS
func NewDnfInstaller ¶
func NewDnfInstaller() Installer
NewDnfInstaller creates a new instance of Installer using script
func NewYumInstaller ¶
func NewYumInstaller() Installer
NewYumInstaller creates a new instance of Installer using script
type KongController ¶
type KongController struct {
// contains filtered or unexported fields
}
KongController allows to control Kong, installed on a host
func NewKongController ¶
func NewKongController(host *pb.Host) (*KongController, error)
NewKongController ...
func (*KongController) Apply ¶
func (k *KongController) Apply(rule map[interface{}]interface{}, values *Variables) error
Apply applies the rule to Kong proxy Currently, support rule types service, route and upstream
type NodeTarget ¶
type NodeTarget struct {
*HostTarget
}
NodeTarget defines a target of type Node of cluster, including a master
type Results ¶
type Results map[string]stepResults
Results ...
func (Results) ErrorMessagesOfHost ¶
ErrorMessagesOfHost ...
func (Results) ErrorMessagesOfStep ¶
ErrorMessagesOfStep ...
func (Results) ResultsOfStep ¶
ResultsOfStep ...
type Settings ¶
type Settings struct {
// SkipProxy to tell not to try to set reverse proxy
SkipProxy bool
// Serialize force not to parallel hosts in step
Serialize bool
// SkipFeatureRequirements tells not to install required features
SkipFeatureRequirements bool
// SkipSizingRequirements tells not to check sizing requirements
SkipSizingRequirements bool
}
Settings are used to tune the feature
type Target ¶
type Target interface {
// Name returns the name of the target
Name() string
// Type returns the name of the target
Type() string
// Methods returns a list of installation methods useable on the target, ordered from
// upper to lower priority (1 = highest priority)
Methods() map[uint8]Method.Enum
// Installed returns a list of installed features
Installed() []string
}
Target is an interface that target must satisfy to be able to install something on it
func NewClusterTarget ¶
func NewClusterTarget(cluster clusterapi.Cluster) Target
NewClusterTarget ...