rest

package
v1.5.5 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ReporterName = "rest"
)

Variables

This section is empty.

Functions

func New

func New(opts ...NewOption) internal.Reporter

New creates a new rest reporter

func NewRest

func NewRest(url string) *http.Client

NewRest returns reporter for sending report to http rest

Types

type NewOption

type NewOption func(*reporter)

NewOption allows specifying various configuration

func WithRestClient

func WithRestClient(rest *http.Client) NewOption

WithRestClient specifies rest client to override when creating rest reporter

type ReporterJSON

type ReporterJSON struct {
	UnixTimestamp int64  `json:"unixTimestamp,omitempty"`
	UUID          string `json:"uuid,omitempty"`
}

ReporterJSON represents generic json data for http POST report

func NewReporterJSON

func NewReporterJSON() ReporterJSON

NewReporterJSON creates new reporter json

Jump to

Keyboard shortcuts

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