httpclient

package
v1.6.6 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2026 License: Apache-2.0 Imports: 6 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package httpclient is a client of the heartbeats' HTTP API

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*client.Client
}

Client is a client of the heartbeats' HTTP API, which wraps the base HTTP client, with typed methods for its requests

func New

func New(url string, opts ...client.ClientOpt) (*Client, error)

New returns a client of the heartbeats' API, at the URL, which is the server's API endpoint, such as http://localhost:8084/api, with the options

func (*Client) CreateHeartbeat

func (c *Client) CreateHeartbeat(ctx context.Context, meta schema.HeartbeatMeta) (*schema.Heartbeat, error)

CreateHeartbeat creates the heartbeat, and returns it

func (*Client) DeleteHeartbeat

func (c *Client) DeleteHeartbeat(ctx context.Context, id uuid.UUID) (*schema.Heartbeat, error)

DeleteHeartbeat deletes the heartbeat with the identifier, and returns it, as it was

func (*Client) GetHeartbeat

func (c *Client) GetHeartbeat(ctx context.Context, id uuid.UUID) (*schema.Heartbeat, error)

GetHeartbeat returns the heartbeat with the identifier

func (*Client) ListHeartbeats

func (c *Client) ListHeartbeats(ctx context.Context, req schema.HeartbeatListRequest) (*schema.HeartbeatList, error)

ListHeartbeats returns the heartbeats, the soonest first, as the request selects, and how many there are

func (*Client) UpdateHeartbeat

func (c *Client) UpdateHeartbeat(ctx context.Context, id uuid.UUID, change schema.HeartbeatRequest) (*schema.Heartbeat, error)

UpdateHeartbeat changes the heartbeat with the identifier, as the request says, and returns it

Jump to

Keyboard shortcuts

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