requests

package
v0.0.0-...-2e2250a Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package requests package provides a client SDK or library for the OpenFaaS gateway REST API

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AsyncReport

type AsyncReport struct {
	FunctionName string  `json:"name"`
	StatusCode   int     `json:"statusCode"`
	TimeTaken    float64 `json:"timeTaken"`
}

AsyncReport is the report from a function executed on a queue worker.

type DeleteFunctionRequest

type DeleteFunctionRequest struct {
	FunctionName string `json:"functionName"`
}

DeleteFunctionRequest delete a deployed function

type ForwardRequest

type ForwardRequest struct {
	RawPath  string
	RawQuery string
	Method   string
}

ForwardRequest for proxying incoming requests

func NewForwardRequest

func NewForwardRequest(method string, url url.URL) ForwardRequest

NewForwardRequest create a ForwardRequest

func (*ForwardRequest) ToURL

func (f *ForwardRequest) ToURL(addr string, watchdogPort int) string

ToURL create formatted URL

type PrometheusAlert

type PrometheusAlert struct {
	Status   string                 `json:"status"`
	Receiver string                 `json:"receiver"`
	Alerts   []PrometheusInnerAlert `json:"alerts"`
}

PrometheusAlert as produced by AlertManager

type PrometheusInnerAlert

type PrometheusInnerAlert struct {
	Status string                    `json:"status"`
	Labels PrometheusInnerAlertLabel `json:"labels"`
}

PrometheusInnerAlert PrometheusInnerAlert

type PrometheusInnerAlertLabel

type PrometheusInnerAlertLabel struct {
	AlertName    string `json:"alertname"`
	FunctionName string `json:"function_name"`
}

PrometheusInnerAlertLabel PrometheusInnerAlertLabel

Jump to

Keyboard shortcuts

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