telefork

package
v1.0.0-rc.12 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package telefork contains Telefork client and processor for sending batches of events to Telefork.

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 is the Telefork Service client.

func NewClient

func NewClient(appName, apiKey string) *Client

NewClient returns a new Telefork client.

func NewClientWithHTTPClient

func NewClientWithHTTPClient(appName, apiKey string, client *http.Client) *Client

NewClientWithHTTPClient returns a new Telefork client with the given HTTP client.

func (*Client) SendEvents

func (c *Client) SendEvents(ctx context.Context, events []interface{}) error

SendEvents sends the given events to Telefork.

type Processor

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

Processor wraps the Telefork Client for use in a Tracker.

func NewProcessor

func NewProcessor(appName, apiKey string) *Processor

NewProcessor returns a new Telefork Processor.

func (*Processor) ProcessRecords

func (p *Processor) ProcessRecords(ctx context.Context, events []interface{}) error

ProcessRecords sends the given events to Telefork.

type Transport

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

Transport is an http.RoundTripper that adds the X-OUTREACH-CLIENT-APP-ID and X-OUTREACH-CLIENT-LOGGING headers.

func NewTransport

func NewTransport(appName, apiKey string, rt http.RoundTripper) *Transport

NewTransport returns a new Transport.

func (*Transport) RoundTrip

func (t *Transport) RoundTrip(r *http.Request) (*http.Response, error)

RoundTrip implements http.RoundTripper.

Jump to

Keyboard shortcuts

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