events

package
v5.0.0-...-8dc4135 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2020 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// SummaryEventsSchemaVersion is the minimum event schema that supports summary events
	SummaryEventsSchemaVersion = 3

	// EventSchemaHeader is an HTTP header that describes the schema version for event requests
	EventSchemaHeader = "X-LaunchDarkly-Event-Schema"
)

Variables

View Source
var (
	ServerSDKEventsEndpoint               = &serverSDKEventsEndpoint{}
	MobileSDKEventsEndpoint               = &mobileSDKEventsEndpoint{}
	JavaScriptSDKEventsEndpoint           = &javaScriptSDKEventsEndpoint{}
	ServerSDKDiagnosticEventsEndpoint     = &serverDiagnosticEventsEndpoint{}
	MobileSDKDiagnosticEventsEndpoint     = &mobileDiagnosticEventsEndpoint{}
	JavaScriptSDKDiagnosticEventsEndpoint = &javaScriptDiagnosticEventsEndpoint{}
)

Functions

This section is empty.

Types

type Config

type Config struct {
	EventsUri         string
	SendEvents        bool
	FlushIntervalSecs int
	SamplingInterval  int32
	Capacity          int
	InlineUsers       bool
}

EventRelay configuration - used in the config file struct in relay.go

type Endpoint

type Endpoint interface {
	fmt.Stringer
}

Describes one of the possible endpoints (on both events.launchdarkly.com and the relay) for posting events

type EventDispatcher

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

EventDispatcher relays events to LaunchDarkly for an environment

func NewEventDispatcher

func NewEventDispatcher(sdkKey string, mobileKey *string, envID *string, loggers ldlog.Loggers, config Config, httpConfig httpconfig.HTTPConfig, featureStore ld.FeatureStore) *EventDispatcher

NewEventDispatcher creates a handler for relaying events to LaunchDarkly for an environment

func (*EventDispatcher) GetHandler

func (r *EventDispatcher) GetHandler(endpoint Endpoint) func(w http.ResponseWriter, req *http.Request)

type EventPublisher

type EventPublisher interface {
	Publish(...interface{})
	PublishRaw(...json.RawMessage)
	Flush()
}

type HttpEventPublisher

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

func NewHttpEventPublisher

func NewHttpEventPublisher(authKey string, loggers ldlog.Loggers, options ...OptionType) (*HttpEventPublisher, error)

func (*HttpEventPublisher) Close

func (p *HttpEventPublisher) Close()

func (*HttpEventPublisher) Flush

func (p *HttpEventPublisher) Flush()

func (*HttpEventPublisher) Publish

func (p *HttpEventPublisher) Publish(events ...interface{})

func (*HttpEventPublisher) PublishRaw

func (p *HttpEventPublisher) PublishRaw(events ...json.RawMessage)

type OptionCapacity

type OptionCapacity int

type OptionClient

type OptionClient struct {
	Client *http.Client
}

type OptionEndpointURI

type OptionEndpointURI string

type OptionFlushInterval

type OptionFlushInterval time.Duration

type OptionType

type OptionType interface {
	// contains filtered or unexported methods
}

type OptionUri

type OptionUri string

type OptionUserAgent

type OptionUserAgent string

Jump to

Keyboard shortcuts

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