http

package
v0.0.0-...-9044304 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package http implements helpers for the runtime settings HTTP API

Package http implements helpers for the runtime settings HTTP API

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHTTPClient

func NewHTTPClient(c *http.Client, baseURL string, targetProcessName string, clientOptions ClientOptions) settings.Client

NewHTTPClient returns a client setup to interact with the standard runtime settings HTTP API

func NewHTTPSClient

func NewHTTPSClient(c ipc.HTTPClient, baseURL string, targetProcessName string, clientOptions ...ipc.RequestOption) settings.Client

NewHTTPSClient returns a client setup to interact with the standard runtime settings HTTPS API, taking advantage of the auth component

Types

type ClientOptions

type ClientOptions struct {
	CloseConnection ShouldCloseConnection
}

ClientOptions holds options for the HTTP client

func NewHTTPClientOptions

func NewHTTPClientOptions(closeConnection ShouldCloseConnection) ClientOptions

NewHTTPClientOptions returns a new struct containing the HTTP client options

type ShouldCloseConnection

type ShouldCloseConnection int

ShouldCloseConnection is an option to DoGet to indicate whether to close the underlying connection after reading the response

const (
	// LeaveConnectionOpen keeps the underlying connection open after reading the request response
	LeaveConnectionOpen ShouldCloseConnection = iota
	// CloseConnection closes the underlying connection after reading the request response
	CloseConnection
)

Jump to

Keyboard shortcuts

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