sync

package
v0.0.0-...-98ed532 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 3, 2024 License: BSD-3-Clause Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client instances send analytics events to GA and S3 endpoints without delay. It is only supposed to be used inside the `state-svc`. All other processes should use the DefaultClient.

func New

func New(source string, cfg *config.Instance, auth *authentication.Auth, out output.Outputer) *Client

New initializes the analytics instance with all custom dimensions known at this time

func (*Client) Close

func (a *Client) Close()

func (*Client) Event

func (a *Client) Event(category, action string, dims ...*dimensions.Values)

func (*Client) EventWithLabel

func (a *Client) EventWithLabel(category, action, label string, dims ...*dimensions.Values)

func (*Client) EventWithSource

func (a *Client) EventWithSource(category, action, source string, dims ...*dimensions.Values)

EventWithSource should only be used by clients forwarding events on behalf of another source. Otherwise, use Event().

func (*Client) EventWithSourceAndLabel

func (a *Client) EventWithSourceAndLabel(category, action, source, label string, dims ...*dimensions.Values)

EventWithSourceAndLabel should only be used by clients forwarding events on behalf of another source (for example, state-svc forwarding events on behalf of State Tool or an executor). Otherwise, use EventWithLabel().

func (*Client) NewReporter

func (a *Client) NewReporter(rep Reporter)

func (*Client) Wait

func (a *Client) Wait()

type Reporter

type Reporter interface {
	ID() string
	Event(category, action, source, label string, dimensions *dimensions.Values) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL