Documentation
¶
Index ¶
- func BaseURL() string
- func ClusterID() uuid.UUID
- func LicenseID() string
- func ReportApplyFinished(c *cli.Context, err error)
- func ReportApplyStarted(c *cli.Context)
- func ReportInstallationFailed(ctx context.Context, err error)
- func ReportInstallationStarted(ctx context.Context)
- func ReportInstallationSucceeded(ctx context.Context)
- func ReportJoinFailed(ctx context.Context, clusterID uuid.UUID, exterr error)
- func ReportJoinStarted(ctx context.Context, clusterID uuid.UUID)
- func ReportJoinSucceeded(ctx context.Context, clusterID uuid.UUID)
- func ReportNodeUpgradeFailed(ctx context.Context, exterr error)
- func ReportNodeUpgradeStarted(ctx context.Context)
- func ReportNodeUpgradeSucceeded(ctx context.Context)
- func ReportUpgradeFailed(ctx context.Context, err error)
- func ReportUpgradeStarted(ctx context.Context)
- func ReportUpgradeSucceeded(ctx context.Context)
- func Send(ctx context.Context, ev Event)
- type Event
- type InstallationFailed
- type InstallationStarted
- type InstallationSucceeded
- type JoinFailed
- type JoinStarted
- type JoinSucceeded
- type NodeUpgradeFailed
- type NodeUpgradeStarted
- type NodeUpgradeSucceeded
- type Sender
- type UpgradeFailed
- type UpgradeStarted
- type UpgradeSucceeded
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BaseURL ¶
func BaseURL() string
BaseURL determines the base url to be used when sending metrics over.
func ClusterID ¶
ClusterID returns the cluster id. It is read from from a local file (if this is a second attempt at installation or an upgrade) or a new one is generated and stored locally. TODO: this should be persisted in the cluster as part of a CRD managed by our operator, as we don't have an operator yet, we are storing it locally only.
func LicenseID ¶
func LicenseID() string
LicenseID returns the embedded license id. If something goes wrong, it returns an empty string.
func ReportApplyFinished ¶
func ReportApplyFinished(c *cli.Context, err error)
ReportApplyFinished decides if we are going to report an InstallationSucceeded, an InstallationFailed, an UpgradeSucceeded, or an UpgradeFailed event and calls the appropriate function.
func ReportApplyStarted ¶
func ReportApplyStarted(c *cli.Context)
ReportApplyStarted decides if we are going to report an InstallationStarted or an UpgradeStarted event and calls the appropriate function.
func ReportInstallationFailed ¶
ReportInstallationFailed reports that the installation has failed.
func ReportInstallationStarted ¶
ReportInstallationStarted reports that the installation has started.
func ReportInstallationSucceeded ¶
ReportInstallationSucceeded reports that the installation has succeeded.
func ReportJoinFailed ¶
ReportJoinFailed reports that a join has failed.
func ReportJoinStarted ¶
ReportJoinStarted reports that a join has started.
func ReportJoinSucceeded ¶
ReportJoinSucceeded reports that a join has finished successfully.
func ReportNodeUpgradeFailed ¶
ReportNodeUpgradeFailed reports that node upgrade has failed.
func ReportNodeUpgradeStarted ¶
ReportNodeUpgradeStarted reports that a node upgrade has started.
func ReportNodeUpgradeSucceeded ¶
ReportNodeUpgradeSucceeded reports that a node upgrade has finished successfully.
func ReportUpgradeFailed ¶
ReportUpgradeFailed reports that the upgrade has failed.
func ReportUpgradeStarted ¶
ReportUpgradeStarted reports that the upgrade has started.
func ReportUpgradeSucceeded ¶
ReportUpgradeSucceeded reports that the upgrade has succeeded.
Types ¶
type Event ¶
type Event interface {
Title() string
}
Event is implemented by all events. Title returns a string that identifies the event type.
type InstallationFailed ¶
type InstallationFailed struct { ClusterID uuid.UUID `json:"clusterID"` Reason string `json:"reason"` }
InstallationFailed event is send back home when the installation fails.
func (InstallationFailed) Title ¶
func (e InstallationFailed) Title() string
Title returns the name of the event.
type InstallationStarted ¶
type InstallationStarted struct { ClusterID uuid.UUID `json:"clusterID"` Version string `json:"version"` Flags string `json:"flags"` BinaryName string `json:"binaryName"` Type string `json:"type"` LicenseID string `json:"licenseID"` }
InstallationStarted event is send back home when the installation starts.
func (InstallationStarted) Title ¶
func (e InstallationStarted) Title() string
Title returns the name of the event.
type InstallationSucceeded ¶
InstallationSucceeded event is send back home when the installation finishes.
func (InstallationSucceeded) Title ¶
func (e InstallationSucceeded) Title() string
Title returns the name of the event.
type JoinFailed ¶
type JoinFailed struct { ClusterID uuid.UUID `json:"clusterID"` NodeName string `json:"nodeName"` Reason string `json:"reason"` }
JoinFailed event is send back home when a node join fails.
type JoinStarted ¶
type JoinStarted struct { ClusterID uuid.UUID `json:"clusterID"` NodeName string `json:"nodeName"` }
JoinStarted event is send back home when a node join starts.
type JoinSucceeded ¶
type JoinSucceeded JoinStarted
JoinSucceeded event is send back home when a node join succeeds.
func (JoinSucceeded) Title ¶
func (e JoinSucceeded) Title() string
Title returns the name of the event.
type NodeUpgradeFailed ¶
type NodeUpgradeFailed JoinFailed
NodeUpgradeFailed event is send back home when a node upgrade fails.
func (NodeUpgradeFailed) Title ¶
func (e NodeUpgradeFailed) Title() string
Title returns the name of the event.
type NodeUpgradeStarted ¶
type NodeUpgradeStarted JoinStarted
NodeUpgradeStarted event is send back home when a node upgrade starts.
func (NodeUpgradeStarted) Title ¶
func (e NodeUpgradeStarted) Title() string
Title returns the name of the event.
type NodeUpgradeSucceeded ¶
type NodeUpgradeSucceeded NodeUpgradeStarted
NodeUpgradeSucceeded event is send back home when a node upgrade succeeds.
func (NodeUpgradeSucceeded) Title ¶
func (e NodeUpgradeSucceeded) Title() string
Title returns the name of the event.
type Sender ¶
type Sender struct {
// contains filtered or unexported fields
}
Sender sends events to the metrics endpoint.
type UpgradeFailed ¶
type UpgradeFailed InstallationFailed
UpgradeFailed event is send back home when the upgrade fails.
func (UpgradeFailed) Title ¶
func (e UpgradeFailed) Title() string
Title returns the name of the event.
type UpgradeStarted ¶
type UpgradeStarted InstallationStarted
UpgradeStarted event is send back home when the upgrade starts.
func (UpgradeStarted) Title ¶
func (e UpgradeStarted) Title() string
Title returns the name of the event.
type UpgradeSucceeded ¶
type UpgradeSucceeded InstallationSucceeded
UpgradeSucceeded event is send back home when the upgrade finishes.
func (UpgradeSucceeded) Title ¶
func (e UpgradeSucceeded) Title() string
Title returns the name of the event.