Documentation ¶
Index ¶
Constants ¶
View Source
const ( // Welcome is displayed the first time the telemetry config is created. Welcome = `` /* 145-byte string literal not displayed */ )
Variables ¶
View Source
var ConfigFile = filepath.Join(".airbyte", "analytics.yml")
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { // Start should be called as soon quickly as possible. Start(EventType) error // Success should be called only if the activity succeeded. Success(EventType) error // Failure should be called only if the activity failed. Failure(EventType, error) error // Attr should be called to add additional attributes to this activity. Attr(key, val string) }
Client interface for telemetry data.
type Config ¶
type Config struct {
UserID ULID `yaml:"anonymous_user_id"`
}
Config represents the analytics.yaml file.
type EventState ¶
type EventState string
const ( Start EventState = "started" Failed EventState = "failed" Success EventState = "succeeded" )
type GetOption ¶ added in v0.2.0
type GetOption func(*getConfig)
GetOption is for optional configuration of the Get call.
func WithDnt ¶ added in v0.2.0
func WithDnt() GetOption
WithDnt tells the Get call to enable the do-not-track configuration.
func WithUserHome ¶ added in v0.2.0
WithUserHome tells the Get call which directory should be considered the user's home. Primary for testing purposes.
type NoopClient ¶
type NoopClient struct { }
NoopClient client, all methods are no-ops.
func (NoopClient) Attr ¶
func (n NoopClient) Attr(_, _ string)
func (NoopClient) Start ¶
func (n NoopClient) Start(EventType) error
func (NoopClient) Success ¶
func (n NoopClient) Success(EventType) error
type SegmentClient ¶
type SegmentClient struct {
// contains filtered or unexported fields
}
SegmentClient client, all methods communicate with segment.
func NewSegmentClient ¶
func NewSegmentClient(cfg Config) *SegmentClient
func (*SegmentClient) Attr ¶
func (s *SegmentClient) Attr(key, val string)
func (*SegmentClient) Start ¶
func (s *SegmentClient) Start(et EventType) error
func (*SegmentClient) Success ¶
func (s *SegmentClient) Success(et EventType) error
type ULID ¶
type ULID ulid.ULID
ULID is a wrapper around ulid.ULID so that we can implement the yaml interfaces.
func (ULID) MarshalYAML ¶
MarshalYAML allows for converting a ULID into a yaml field.
func (*ULID) UnmarshalYAML ¶
UnmarshalYAML allows for converting a yaml field into a ULID.
Click to show internal directories.
Click to hide internal directories.