client

package
v0.0.52 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2026 License: MIT Imports: 20 Imported by: 3

Documentation

Overview

Code generated generate_clients.go. DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	Adminv2() Adminv2
	Apiv2() Apiv2
	Infrav2() Infrav2

	Ping(context.Context, *PingConfig)
}

func New

func New(config *DialConfig) (Client, error)

type DialConfig

type DialConfig struct {
	BaseURL string
	Token   string

	// Optional client Interceptors
	Interceptors []connect.Interceptor

	UserAgent string
	// TokenRenewal defines if and how the token should be renewed
	TokenRenewal *TokenRenewal

	Transport http.RoundTripper

	Log *slog.Logger
	// contains filtered or unexported fields
}

DialConfig is the configuration to create a api-server connection

func (*DialConfig) HttpClient

func (d *DialConfig) HttpClient() *http.Client

type PersistTokenFn added in v0.0.4

type PersistTokenFn func(token string) error

func NewFilesystemTokenPersister added in v0.0.23

func NewFilesystemTokenPersister(tokenFile string) (PersistTokenFn, error)

type PingConfig added in v0.0.50

type PingConfig struct {
	// ComponentType should be set to the type of the microservice
	ComponentType v2.ComponentType
	// Identifier helps to identify multiple instances of a microservice
	// Usually the hostname or the podname could be used for that
	// If omitted, hostname is used
	Identifier *string
	// StartedAt contains the starttime when this go process was started
	StartedAt time.Time
	// Interval at which the ping should happen
	// If not specified, or shorter than 1min, or longer than 1h, it defaults to 5min
	Interval time.Duration
	// Version contains all version details about this microservice
	// You should use https://github.com/metal-stack/v to get all information.
	Version v2.Version
}

PingConfig is used to configure ping

type TokenRenewal added in v0.0.4

type TokenRenewal struct {
	// PersistTokenFn is called to persist the newly fetched token
	// token will not be persisted if not specified
	PersistTokenFn PersistTokenFn
}

Jump to

Keyboard shortcuts

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