cilium: github.com/cilium/cilium/api/v1/health/server/restapi Index | Files | Directories

package restapi

import "github.com/cilium/cilium/api/v1/health/server/restapi"

Index

Package Files

cilium_health_api.go get_healthz.go get_healthz_parameters.go get_healthz_responses.go get_healthz_urlbuilder.go

Constants

const GetHealthzFailedCode int = 500

GetHealthzFailedCode is the HTTP code returned for type GetHealthzFailed

const GetHealthzOKCode int = 200

GetHealthzOKCode is the HTTP code returned for type GetHealthzOK

type CiliumHealthAPI Uses

type CiliumHealthAPI struct {
    Middleware func(middleware.Builder) http.Handler

    // BasicAuthenticator generates a runtime.Authenticator from the supplied basic auth function.
    // It has a default implementation in the security package, however you can replace it for your particular usage.
    BasicAuthenticator func(security.UserPassAuthentication) runtime.Authenticator
    // APIKeyAuthenticator generates a runtime.Authenticator from the supplied token auth function.
    // It has a default implementation in the security package, however you can replace it for your particular usage.
    APIKeyAuthenticator func(string, string, security.TokenAuthentication) runtime.Authenticator
    // BearerAuthenticator generates a runtime.Authenticator from the supplied bearer token auth function.
    // It has a default implementation in the security package, however you can replace it for your particular usage.
    BearerAuthenticator func(string, security.ScopedTokenAuthentication) runtime.Authenticator

    // JSONConsumer registers a consumer for a "application/json" mime type
    JSONConsumer runtime.Consumer

    // JSONProducer registers a producer for a "application/json" mime type
    JSONProducer runtime.Producer

    // GetHealthzHandler sets the operation handler for the get healthz operation
    GetHealthzHandler GetHealthzHandler
    // ConnectivityGetStatusHandler sets the operation handler for the get status operation
    ConnectivityGetStatusHandler connectivity.GetStatusHandler
    // ConnectivityPutStatusProbeHandler sets the operation handler for the put status probe operation
    ConnectivityPutStatusProbeHandler connectivity.PutStatusProbeHandler

    // ServeError is called when an error is received, there is a default handler
    // but you can set your own with this
    ServeError func(http.ResponseWriter, *http.Request, error)

    // ServerShutdown is called when the HTTP(S) server is shut down and done
    // handling all active connections and does not accept connections any more
    ServerShutdown func()

    // Custom command line argument groups with their descriptions
    CommandLineOptionsGroups []swag.CommandLineOptionsGroup

    // User defined logger function.
    Logger func(string, ...interface{})
    // contains filtered or unexported fields
}

CiliumHealthAPI Cilium Health Checker

func NewCiliumHealthAPI Uses

func NewCiliumHealthAPI(spec *loads.Document) *CiliumHealthAPI

NewCiliumHealthAPI creates a new CiliumHealth instance

func (*CiliumHealthAPI) AuthenticatorsFor Uses

func (o *CiliumHealthAPI) AuthenticatorsFor(schemes map[string]spec.SecurityScheme) map[string]runtime.Authenticator

AuthenticatorsFor gets the authenticators for the specified security schemes

func (*CiliumHealthAPI) Authorizer Uses

func (o *CiliumHealthAPI) Authorizer() runtime.Authorizer

Authorizer returns the registered authorizer

func (*CiliumHealthAPI) ConsumersFor Uses

func (o *CiliumHealthAPI) ConsumersFor(mediaTypes []string) map[string]runtime.Consumer

ConsumersFor gets the consumers for the specified media types

func (*CiliumHealthAPI) Context Uses

func (o *CiliumHealthAPI) Context() *middleware.Context

Context returns the middleware context for the cilium health API

func (*CiliumHealthAPI) DefaultConsumes Uses

func (o *CiliumHealthAPI) DefaultConsumes() string

DefaultConsumes returns the default consumes media type

func (*CiliumHealthAPI) DefaultProduces Uses

func (o *CiliumHealthAPI) DefaultProduces() string

DefaultProduces returns the default produces media type

func (*CiliumHealthAPI) Formats Uses

func (o *CiliumHealthAPI) Formats() strfmt.Registry

Formats returns the registered string formats

func (*CiliumHealthAPI) HandlerFor Uses

func (o *CiliumHealthAPI) HandlerFor(method, path string) (http.Handler, bool)

HandlerFor gets a http.Handler for the provided operation method and path

func (*CiliumHealthAPI) Init Uses

func (o *CiliumHealthAPI) Init()

Init allows you to just initialize the handler cache, you can then recompose the middleware as you see fit

func (*CiliumHealthAPI) ProducersFor Uses

func (o *CiliumHealthAPI) ProducersFor(mediaTypes []string) map[string]runtime.Producer

ProducersFor gets the producers for the specified media types

func (*CiliumHealthAPI) RegisterConsumer Uses

func (o *CiliumHealthAPI) RegisterConsumer(mediaType string, consumer runtime.Consumer)

RegisterConsumer allows you to add (or override) a consumer for a media type.

func (*CiliumHealthAPI) RegisterFormat Uses

func (o *CiliumHealthAPI) RegisterFormat(name string, format strfmt.Format, validator strfmt.Validator)

RegisterFormat registers a custom format validator

func (*CiliumHealthAPI) RegisterProducer Uses

func (o *CiliumHealthAPI) RegisterProducer(mediaType string, producer runtime.Producer)

RegisterProducer allows you to add (or override) a producer for a media type.

func (*CiliumHealthAPI) Serve Uses

func (o *CiliumHealthAPI) Serve(builder middleware.Builder) http.Handler

Serve creates a http handler to serve the API over HTTP can be used directly in http.ListenAndServe(":8000", api.Serve(nil))

func (*CiliumHealthAPI) ServeErrorFor Uses

func (o *CiliumHealthAPI) ServeErrorFor(operationID string) func(http.ResponseWriter, *http.Request, error)

ServeErrorFor gets a error handler for a given operation id

func (*CiliumHealthAPI) SetDefaultConsumes Uses

func (o *CiliumHealthAPI) SetDefaultConsumes(mediaType string)

SetDefaultConsumes returns the default consumes media type

func (*CiliumHealthAPI) SetDefaultProduces Uses

func (o *CiliumHealthAPI) SetDefaultProduces(mediaType string)

SetDefaultProduces sets the default produces media type

func (*CiliumHealthAPI) SetSpec Uses

func (o *CiliumHealthAPI) SetSpec(spec *loads.Document)

SetSpec sets a spec that will be served for the clients.

func (*CiliumHealthAPI) Validate Uses

func (o *CiliumHealthAPI) Validate() error

Validate validates the registrations in the CiliumHealthAPI

type GetHealthz Uses

type GetHealthz struct {
    Context *middleware.Context
    Handler GetHealthzHandler
}

GetHealthz swagger:route GET /healthz getHealthz

Get health of Cilium node

Returns health and status information of the local node including load and uptime, as well as the status of related components including the Cilium daemon.

func NewGetHealthz Uses

func NewGetHealthz(ctx *middleware.Context, handler GetHealthzHandler) *GetHealthz

NewGetHealthz creates a new http.Handler for the get healthz operation

func (*GetHealthz) ServeHTTP Uses

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

type GetHealthzFailed Uses

type GetHealthzFailed struct {

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

GetHealthzFailed Failed to contact local Cilium daemon

swagger:response getHealthzFailed

func NewGetHealthzFailed Uses

func NewGetHealthzFailed() *GetHealthzFailed

NewGetHealthzFailed creates GetHealthzFailed with default headers values

func (*GetHealthzFailed) SetPayload Uses

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

SetPayload sets the payload to the get healthz failed response

func (*GetHealthzFailed) WithPayload Uses

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

WithPayload adds the payload to the get healthz failed response

func (*GetHealthzFailed) WriteResponse Uses

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

WriteResponse to the client

type GetHealthzHandler Uses

type GetHealthzHandler interface {
    Handle(GetHealthzParams) middleware.Responder
}

GetHealthzHandler interface for that can handle valid get healthz params

type GetHealthzHandlerFunc Uses

type GetHealthzHandlerFunc func(GetHealthzParams) middleware.Responder

GetHealthzHandlerFunc turns a function with the right signature into a get healthz handler

func (GetHealthzHandlerFunc) Handle Uses

func (fn GetHealthzHandlerFunc) Handle(params GetHealthzParams) middleware.Responder

Handle executing the request and returning a response

type GetHealthzOK Uses

type GetHealthzOK struct {

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

GetHealthzOK Success

swagger:response getHealthzOK

func NewGetHealthzOK Uses

func NewGetHealthzOK() *GetHealthzOK

NewGetHealthzOK creates GetHealthzOK with default headers values

func (*GetHealthzOK) SetPayload Uses

func (o *GetHealthzOK) SetPayload(payload *models.HealthResponse)

SetPayload sets the payload to the get healthz o k response

func (*GetHealthzOK) WithPayload Uses

func (o *GetHealthzOK) WithPayload(payload *models.HealthResponse) *GetHealthzOK

WithPayload adds the payload to the get healthz o k response

func (*GetHealthzOK) WriteResponse Uses

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

WriteResponse to the client

type GetHealthzParams Uses

type GetHealthzParams struct {

    // HTTP Request Object
    HTTPRequest *http.Request `json:"-"`
}

GetHealthzParams contains all the bound params for the get healthz operation typically these are obtained from a http.Request

swagger:parameters GetHealthz

func NewGetHealthzParams Uses

func NewGetHealthzParams() GetHealthzParams

NewGetHealthzParams creates a new GetHealthzParams object no default values defined in spec.

func (*GetHealthzParams) BindRequest Uses

func (o *GetHealthzParams) 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.

To ensure default values, the struct must have been initialized with NewGetHealthzParams() beforehand.

type GetHealthzURL Uses

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

GetHealthzURL generates an URL for the get healthz operation

func (*GetHealthzURL) Build Uses

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

Build a url path and query string

func (*GetHealthzURL) BuildFull Uses

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

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

func (*GetHealthzURL) Must Uses

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

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

func (*GetHealthzURL) SetBasePath Uses

func (o *GetHealthzURL) 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 (*GetHealthzURL) String Uses

func (o *GetHealthzURL) String() string

String returns the string representation of the path with query string

func (*GetHealthzURL) StringFull Uses

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

StringFull returns the string representation of a complete url

func (*GetHealthzURL) WithBasePath Uses

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

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

Directories

PathSynopsis
connectivity

Package restapi imports 16 packages (graph) and is imported by 2 packages. Updated 2019-07-29. Refresh now. Tools for package owners.