client

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

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

Go to latest
Published: Feb 21, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeHealthzResponse

func DecodeHealthzResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error)

DecodeHealthzResponse returns a decoder for responses returned by the health healthz endpoint. restoreBody controls whether the response body should be restored after having been read.

func DecodeLivezResponse

func DecodeLivezResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error)

DecodeLivezResponse returns a decoder for responses returned by the health livez endpoint. restoreBody controls whether the response body should be restored after having been read.

func HealthzHealthPath

func HealthzHealthPath() string

HealthzHealthPath returns the URL path to the health service healthz HTTP endpoint.

func LivezHealthPath

func LivezHealthPath() string

LivezHealthPath returns the URL path to the health service livez HTTP endpoint.

Types

type Client

type Client struct {
	// Healthz Doer is the HTTP client used to make requests to the healthz
	// endpoint.
	HealthzDoer goahttp.Doer

	// Livez Doer is the HTTP client used to make requests to the livez endpoint.
	LivezDoer goahttp.Doer

	// RestoreResponseBody controls whether the response bodies are reset after
	// decoding so they can be read again.
	RestoreResponseBody bool
	// contains filtered or unexported fields
}

Client lists the health service endpoint HTTP clients.

func NewClient

func NewClient(
	scheme string,
	host string,
	doer goahttp.Doer,
	enc func(*http.Request) goahttp.Encoder,
	dec func(*http.Response) goahttp.Decoder,
	restoreBody bool,
) *Client

NewClient instantiates HTTP clients for all the health service servers.

func (*Client) BuildHealthzRequest

func (c *Client) BuildHealthzRequest(ctx context.Context, v any) (*http.Request, error)

BuildHealthzRequest instantiates a HTTP request object with method and path set to call the "health" service "healthz" endpoint

func (*Client) BuildLivezRequest

func (c *Client) BuildLivezRequest(ctx context.Context, v any) (*http.Request, error)

BuildLivezRequest instantiates a HTTP request object with method and path set to call the "health" service "livez" endpoint

func (*Client) Healthz

func (c *Client) Healthz() goa.Endpoint

Healthz returns an endpoint that makes HTTP requests to the health service healthz server.

func (*Client) Livez

func (c *Client) Livez() goa.Endpoint

Livez returns an endpoint that makes HTTP requests to the health service livez server.

Jump to

Keyboard shortcuts

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