http

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFromCLI

func NewFromCLI(c *cli.Context, tracer opentracing.Tracer) (eventsources.EventSource, error)

func NewSource

func NewSource(tracer opentracing.Tracer) (eventsources.EventSource, error)

Types

type Event

type Event struct {
	Identifier string `json:"id"`
	Action     string
	ParentID   *string
	Error      bool
	Namespace  string
	Type       string
	Metadata   map[string]interface{}
}

func (Event) IsError

func (e Event) IsError() (bool, error)

func (Event) OperationName

func (e Event) OperationName() string

func (Event) ParentSpanID

func (e Event) ParentSpanID() (*string, error)

ParentSpanID allows this HTTP event to reference any other event.

func (Event) SpanID

func (e Event) SpanID() (string, error)

ID is how an INDIVIDUAL event is referenced internally

func (Event) State

func (Event) Tags

func (e Event) Tags() (map[string]interface{}, error)

func (Event) Timings added in v0.3.0

func (e Event) Timings() (eventsources.EventTimings, error)

type Source

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

func (*Source) Event

func (es *Source) Event(r *http.Request, payload []byte) (eventsources.Event, error)

func (*Source) Name

func (es *Source) Name() string

func (*Source) SecretKey

func (es *Source) SecretKey() []byte

func (*Source) Tracer

func (es *Source) Tracer() opentracing.Tracer

func (*Source) ValidatePayload

func (es *Source) ValidatePayload(r *http.Request, secretKey []byte) ([]byte, error)

Jump to

Keyboard shortcuts

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