client

package
v2.8.0 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2026 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const APIPath = "/api/v0.1"

Variables

View Source
var (
	ErrRequestTimeout   = errors.New("request timed out")
	ErrInvalidParams    = errors.New("invalid params")
	ErrRequestCancelled = errors.New("request cancelled")
)

Functions

func DisableZapScript

func DisableZapScript(cfg *config.Instance) func()

DisableZapScript disables the service running any processed ZapScript from tokens, and returns a function to re-enable it. The returned function must be run even if there is an error so the service isn't left in an unusable state.

func LocalClient

func LocalClient(
	ctx context.Context,
	cfg *config.Instance,
	method string,
	params string,
) (string, error)

LocalClient sends a single unauthenticated method with params to the local running API service, waits for a response until timeout then disconnects.

func WaitNotification

func WaitNotification(
	ctx context.Context,
	timeout time.Duration,
	cfg *config.Instance,
	id string,
) (string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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