payload

package
v0.0.0-...-719a1d6 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2018 License: MPL-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package payload contains payload structures and logic for serializing and deserializing these structures.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Counter

type Counter struct {
	Key   string  `json:"k" msg:"k"`
	Value float64 `json:"v" msg:"v"`
}

A Counter is a metric that is to be aggregated by simple summation.

func (*Counter) DecodeMsg

func (z *Counter) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (Counter) EncodeMsg

func (z Counter) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (Counter) MarshalMsg

func (z Counter) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (Counter) Msgsize

func (z Counter) Msgsize() (s int)

func (*Counter) UnmarshalMsg

func (z *Counter) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type Measure

type Measure struct {
	Key   string    `json:"k" msg:"k"`
	Value []float64 `json:"v" msg:"v"`
}

A Measure is metric that is to be aggregated as a series of discrete values, by estimation of percentiles.

func (*Measure) DecodeMsg

func (z *Measure) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (*Measure) EncodeMsg

func (z *Measure) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*Measure) MarshalMsg

func (z *Measure) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*Measure) Msgsize

func (z *Measure) Msgsize() (s int)

func (*Measure) UnmarshalMsg

func (z *Measure) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type Payload

type Payload struct {
	Counters []Counter `json:"counters" msg:"counters"`
	Measures []Measure `json:"measures" msg:"measures"`
}

A Payload is the payload of a single request.

func (*Payload) DecodeMsg

func (z *Payload) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (*Payload) EncodeMsg

func (z *Payload) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*Payload) MarshalMsg

func (z *Payload) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*Payload) Msgsize

func (z *Payload) Msgsize() (s int)

func (*Payload) UnmarshalMsg

func (z *Payload) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type Response

type Response struct {
	Code    string `json:"code" msg:"code"`
	Message string `json:"message" msg:"message"`
}

The Response hold the result code and message from any request.

func (*Response) DecodeMsg

func (z *Response) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (Response) EncodeMsg

func (z Response) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (Response) MarshalMsg

func (z Response) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (Response) Msgsize

func (z Response) Msgsize() (s int)

func (*Response) UnmarshalMsg

func (z *Response) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

Jump to

Keyboard shortcuts

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