client

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2025 License: Apache-2.0, MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func New

func New(endpoint *url.URL, opts ...Option) (*Client, error)

New constructs an admin API client.

func NewFromConfig

func NewFromConfig(cfg config.Client) (*Client, error)

NewFromConfig builds a client using repository config defaults.

func (*Client) ListLogLevels

func (c *Client) ListLogLevels(ctx context.Context) (map[string]string, error)

ListLogLevels fetches the list of configured loggers and their levels.

func (*Client) SetLogLevel

func (c *Client) SetLogLevel(ctx context.Context, system, level string) error

SetLogLevel sets the log level for a specific subsystem.

func (*Client) SetLogLevelRegex

func (c *Client) SetLogLevelRegex(ctx context.Context, expression, level string) error

SetLogLevelRegex sets the log level for all subsystems matching the expression.

type ErrFailedResponse

type ErrFailedResponse struct {
	StatusCode int
	Body       string
}

func (ErrFailedResponse) Error

func (e ErrFailedResponse) Error() string

type Option

type Option func(*Client) error

func WithBearerFromSigner

func WithBearerFromSigner(id principal.Signer) Option

WithBearerFromSigner configures the Authorization header using a JWT signed by the provided signer.

func WithHTTPClient

func WithHTTPClient(client *http.Client) Option

WithHTTPClient replaces the underlying HTTP client (for custom timeouts, tracing, etc.).

Jump to

Keyboard shortcuts

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