models

package
v0.0.0-...-c225d3c Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2018 License: GPL-2.0 Imports: 0 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AggRequest

type AggRequest struct {
	//Requests that this service should make.
	Requests []RequestInstance `json:"requests"`
	//The number of ms to wait before giving up on the aggregation.
	Timeout int `json:"timeout"`
	//The number of goroutines to run
	Concurrency int `json:"concurrency"`
}

* A request object

type AggResponse

type AggResponse struct {
	Responses []RequestResponse `json:"responses"`
	Metrics   []ResponseMetrics `json:"metrics"`
}

type RequestHeader

type RequestHeader struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

* Header object for http requests

type RequestInstance

type RequestInstance struct {
	//The Url we are going to request
	Url string `json:"requestUrl"`
	//Any headers needed for pass along.
	Headers []RequestHeader `json:"headers"`
	//Method of the request [POST/GET/PUT/DELETE]
	Method string `json:"method"`
	//Body, an optional body
	Body string `json:"body"`
}

type RequestResponse

type RequestResponse struct {
	Url             string           `json:"url"`
	ResponseHeaders []ResponseHeader `json:"responseHeaders"`
	ResponseBody    string           `json:"responseBody"`
	StatusCode      int              `json:"statusCode"`
}

type RequestsPipelineInstance

type RequestsPipelineInstance struct {
	Response        RequestResponse
	ResponseMetrics ResponseMetrics
}

type ResponseHeader

type ResponseHeader struct {
	Key   string   `json:"key"`
	Value []string `json:"value"`
}

type ResponseMetrics

type ResponseMetrics struct {
	RequestUrl       string   `json:"requestUrl"`
	ContentLength    int64    `json:"contentLength"`
	ResponseTimeMs   int      `json:"responseTimeMs"`
	StatusCode       int      `json:"StatusCode"`
	TransferEncoding []string `json:transferEncoding`
}

* Object used to track the speed of the requests down stream in the stack.

type TriggerRequest

type TriggerRequest struct {
	ResponseTime int `json:"responseTime"`
}

* Request in object for variable response time handleing.

type TriggerResponse

type TriggerResponse struct {
	Response string `json:"response"`
}

Jump to

Keyboard shortcuts

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