client

package
v0.0.0-...-c32f71b Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2026 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrMissingRespArgs = errors.New("Expected resp args for 200 response")

Functions

This section is empty.

Types

type APIClient

type APIClient struct {
	// contains filtered or unexported fields
}

simple API client for ISM API, safe for concurrent use and intended for testing.

func NewAPIClient

func NewAPIClient(endpoint string) *APIClient

func (*APIClient) CheckEnv

func (ac *APIClient) CheckEnv(
	ctx context.Context,
	logger log.Logger,
	env *spec.CheckArgs,
) (*spec.CheckResult, error)

submit env creation request

func (*APIClient) CreateEnv

func (ac *APIClient) CreateEnv(
	ctx context.Context,
	logger log.Logger,
	env *spec.EnvArgs,
) (*spec.CreateResponse, error)

submit env creation request

func (*APIClient) FetchMetrics

func (ac *APIClient) FetchMetrics(
	ctx context.Context,
	logger log.Logger,
) (map[string]*dto.MetricFamily, error)

fetch prometheus metrics from API

func (*APIClient) Healthcheck

func (ac *APIClient) Healthcheck(
	ctx context.Context,
	logger log.Logger,
) error

submit env creation request

func (*APIClient) IsabelleVersions

func (ac *APIClient) IsabelleVersions(
	ctx context.Context,
	logger log.Logger,
) (spec.IsabelleVersionResponse, error)

fetch API version support matrix

func (*APIClient) Request

func (ac *APIClient) Request(
	ctx context.Context, logger log.Logger,
	method string, path string, args any, respArgs any,
) error

make arbitrary JSON-based request to api

func (*APIClient) Specification

func (ac *APIClient) Specification(
	ctx context.Context,
	logger log.Logger,
) ([]byte, error)

fetch API specification

func (*APIClient) StatusEnv

func (ac *APIClient) StatusEnv(
	ctx context.Context,
	logger log.Logger,
	env *spec.EnvID,
) (*spec.StatusResponse, error)

submit env creation request

func (*APIClient) Versions

func (ac *APIClient) Versions(
	ctx context.Context,
	logger log.Logger,
) (spec.VersionResponse, error)

fetch API version support matrix

Source Files

  • simple.go

Jump to

Keyboard shortcuts

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