Documentation
¶
Index ¶
- Constants
- Variables
- func PingCheck(engineName, category string, pingImmediately bool)
- func RegisterVersionGetter(getter func() string)
- type Usage
- func (u *Usage) ApplicationBuilder() *Usage
- func (u *Usage) CommonBuild(engineName string) *Usage
- func (u *Usage) InstallBuilder(override bool) *Usage
- func (u *Usage) Send()
- func (u *Usage) SetCategory(c string) *Usage
- func (u *Usage) SetNodeCount(n string) *Usage
- func (u *Usage) SetReplicaCount(replicaCount string) *Usage
- func (u *Usage) SetVolumeCapacity(volCapG string) *Usage
- func (u *Usage) SetVolumeClaimName(name string) *Usage
- func (u *Usage) SetVolumeName(name string) *Usage
- type VersionSet
Constants ¶
const ( // DefaultMeasurementId is the default unique code of the OpenEBS property in Google Analytics. DefaultMeasurementId string = "G-TZGP46618W" // DefaultApiSecret is the default measurement protocol api_secret. DefaultApiSecret string = "91JGdTg9QwGn7Y-vvuM4zA" // InstallEvent event is sent on pod starts InstallEvent string = "install" // VolumeProvision event is sent when a volume is created VolumeProvision string = "volume-provision" // VolumeDeprovision event is sent when a volume is deleted VolumeDeprovision string = "volume-deprovision" // AppName the application name AppName string = "OpenEBS" // Replica Event replication Replica string = "replica:" // DefaultReplicaCount holds the replica count string DefaultReplicaCount string = "replica:1" // RunningStatus status is running RunningStatus string = "running" // EventLabelNode holds the string label "nodes" EventLabelNode string = "nodes" // EventLabelCapacity holds the string label "capacity" EventLabelCapacity string = "capacity" // MeasurementIdEnv sets the measurement ID for the target GA4 property. MeasurementIdEnv = "GA_ID" // ApiSecretEnv sets the measurement protocol API secret for the target GA4 property. ApiSecretEnv = "GA_KEY" )
Variables ¶
var (
GetOpenebsVersionDetails func() string
)
var OpenEBSPingPeriod = "OPENEBS_IO_ANALYTICS_PING_INTERVAL"
OpenEBSPingPeriod ping interval of volume io analytics
Functions ¶
func RegisterVersionGetter ¶
func RegisterVersionGetter(getter func() string)
RegisterVersionGetter sets the function that can be used to fetch app version details.
Types ¶
type Usage ¶
type Usage struct { // OpenebsEventBuilder to build the OpenEBSEvent OpenebsEventBuilder *ga4Event.OpenebsEventBuilder // GA4 Analytics Client AnalyticsClient *ga4Client.MeasurementClient }
Usage struct represents all information about a usage metric sent to Google Analytics with respect to the application
func (*Usage) ApplicationBuilder ¶
ApplicationBuilder Application builder is used for adding k8s&openebs environment detail for non install events
func (*Usage) CommonBuild ¶
CommonBuild is a common builder method for Usage struct
func (*Usage) InstallBuilder ¶
InstallBuilder is a concrete builder for install events
func (*Usage) SetCategory ¶
SetCategory sets the category of an event
func (*Usage) SetNodeCount ¶ added in v0.2.0
SetNodeCount sets the node count for a k8s cluster.
func (*Usage) SetReplicaCount ¶
SetReplicaCount sets the number of replicas for a volume.
func (*Usage) SetVolumeCapacity ¶
SetVolumeCapacity sets the size of a volume.
func (*Usage) SetVolumeClaimName ¶
SetVolumeClaimName i.e pvc name
func (*Usage) SetVolumeName ¶
SetVolumeName i.e pv name
type VersionSet ¶
type VersionSet struct {
// contains filtered or unexported fields
}
VersionSet is a struct which stores (sort of) fixed information about a k8s environment