apiclient

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package apiclient talks to the API of a locally running roji server.

Requests connect to an address the server listens on and carry the dashboard hostname in the Host header. That avoids depending on *.localhost DNS resolution while still reaching the dashboard virtual host, which is the only one that serves the /_api endpoints.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(settings *config.Settings, path string, timeout time.Duration) (*http.Response, error)

Get sends a GET request to the local roji API endpoint at path. The caller is responsible for closing the response body.

func NewClient

func NewClient(timeout time.Duration) *http.Client

NewClient returns an HTTP client for talking to the local roji server. TLS verification is disabled because roji serves a self-signed certificate.

func NewRequest

func NewRequest(settings *config.Settings, path string) (*http.Request, error)

NewRequest builds a GET request against the local roji API endpoint at path, using the resolved settings for the listen address and the dashboard hostname.

Types

This section is empty.

Jump to

Keyboard shortcuts

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