health

package
v0.0.0-...-13dad8c Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const HealthOKCode int = 200

HealthOKCode is the HTTP code returned for type HealthOK

Variables

This section is empty.

Functions

This section is empty.

Types

type Health

type Health struct {
	Context *middleware.Context
	Handler HealthHandler
}

Health swagger:route GET /health Health health

UNVERSIONED Health check endpoint. Required for all services

Performs detailed internal checks and reports back whether or not the service is operating properly https://confluence.splunk.com/display/PROD/Common+Microservice+Endpoints+and+Version+Management

func NewHealth

func NewHealth(ctx *middleware.Context, handler HealthHandler) *Health

NewHealth creates a new http.Handler for the health operation

func (*Health) ServeHTTP

func (o *Health) ServeHTTP(rw http.ResponseWriter, r *http.Request)

type HealthDefault

type HealthDefault struct {

	/*
	  In: Body
	*/
	Payload *models.Error `json:"body,omitempty"`
	// contains filtered or unexported fields
}

HealthDefault Unexpected error

swagger:response healthDefault

func NewHealthDefault

func NewHealthDefault(code int) *HealthDefault

NewHealthDefault creates HealthDefault with default headers values

func (*HealthDefault) SetPayload

func (o *HealthDefault) SetPayload(payload *models.Error)

SetPayload sets the payload to the health default response

func (*HealthDefault) SetStatusCode

func (o *HealthDefault) SetStatusCode(code int)

SetStatusCode sets the status to the health default response

func (*HealthDefault) WithPayload

func (o *HealthDefault) WithPayload(payload *models.Error) *HealthDefault

WithPayload adds the payload to the health default response

func (*HealthDefault) WithStatusCode

func (o *HealthDefault) WithStatusCode(code int) *HealthDefault

WithStatusCode adds the status to the health default response

func (*HealthDefault) WriteResponse

func (o *HealthDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type HealthHandler

type HealthHandler interface {
	Handle(HealthParams) middleware.Responder
}

HealthHandler interface for that can handle valid health params

type HealthHandlerFunc

type HealthHandlerFunc func(HealthParams) middleware.Responder

HealthHandlerFunc turns a function with the right signature into a health handler

func (HealthHandlerFunc) Handle

Handle executing the request and returning a response

type HealthOK

type HealthOK struct {

	/*
	  In: Body
	*/
	Payload *models.Health `json:"body,omitempty"`
}

HealthOK Service is operating normally

swagger:response healthOK

func NewHealthOK

func NewHealthOK() *HealthOK

NewHealthOK creates HealthOK with default headers values

func (*HealthOK) SetPayload

func (o *HealthOK) SetPayload(payload *models.Health)

SetPayload sets the payload to the health o k response

func (*HealthOK) WithPayload

func (o *HealthOK) WithPayload(payload *models.Health) *HealthOK

WithPayload adds the payload to the health o k response

func (*HealthOK) WriteResponse

func (o *HealthOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type HealthParams

type HealthParams struct {

	// HTTP Request Object
	HTTPRequest *http.Request
}

HealthParams contains all the bound params for the health operation typically these are obtained from a http.Request

swagger:parameters health

func NewHealthParams

func NewHealthParams() HealthParams

NewHealthParams creates a new HealthParams object with the default values initialized.

func (*HealthParams) BindRequest

func (o *HealthParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error

BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface for simple values it will use straight method calls

type HealthURL

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

HealthURL generates an URL for the health operation

func (*HealthURL) Build

func (o *HealthURL) Build() (*url.URL, error)

Build a url path and query string

func (*HealthURL) BuildFull

func (o *HealthURL) BuildFull(scheme, host string) (*url.URL, error)

BuildFull builds a full url with scheme, host, path and query string

func (*HealthURL) Must

func (o *HealthURL) Must(u *url.URL, err error) *url.URL

Must is a helper function to panic when the url builder returns an error

func (*HealthURL) SetBasePath

func (o *HealthURL) SetBasePath(bp string)

SetBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

func (*HealthURL) String

func (o *HealthURL) String() string

String returns the string representation of the path with query string

func (*HealthURL) StringFull

func (o *HealthURL) StringFull(scheme, host string) string

StringFull returns the string representation of a complete url

func (*HealthURL) WithBasePath

func (o *HealthURL) WithBasePath(bp string) *HealthURL

WithBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

Jump to

Keyboard shortcuts

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