Documentation ¶
Index ¶
- Constants
- Variables
- func PingCheck(engineName, category string)
- 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) SetAction(a string) *Usage
- func (u *Usage) SetCategory(c string) *Usage
- func (u *Usage) SetLabel(l string) *Usage
- func (u *Usage) SetReplicaCount(count, method string) *Usage
- func (u *Usage) SetValue(v 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 ( // MeasurementId is the unique code of the OpenEBS property in Google Analytics. MeasurementId string = "G-TZGP46618W" // ApiSecret is the measurement protocol api_secret. ApiSecret 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" )
Variables ¶
var (
GetOpenebsVersionDetails func() string
)
var OpenEBSPingPeriod = "OPENEBS_IO_ANALYTICS_PING_INTERVAL"
OpenEBSPingPeriod ping interval of volume io analytics
Functions ¶
func PingCheck ¶
func PingCheck(engineName, category string)
PingCheck sends ping events to Google Analytics
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) SetReplicaCount ¶
SetReplicaCount Wrapper for setting replica count for volume events NOTE: This doesn't get the replica count in a volume de-provision event. TODO: Pick the current value of replica-count from the CAS-engine
func (*Usage) SetVolumeCapacity ¶
SetVolumeCapacity sets the storage capacity of the volume for a volume event
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