client

package
v0.0.0-...-bf751aa Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultRetryCount is the default number of retries.
	DefaultRetryCount = 3
)

Variables

This section is empty.

Functions

func GetRekorClient

func GetRekorClient(rekorServerURL string, opts ...Option) (*client.Rekor, error)

Types

type Option

type Option func(*options)

Option is a functional option for customizing static signatures.

func WithHeaders

func WithHeaders(h map[string][]string) Option

WithHeaders sets default headers for every client request.

func WithInsecureTLS

func WithInsecureTLS(enabled bool) Option

WithInsecureTLS disables TLS verification.

func WithLogger

func WithLogger(logger interface{}) Option

WithLogger sets the logger; it must implement either retryablehttp.Logger or retryablehttp.LeveledLogger; if not, this will not take effect.

func WithNoDisableKeepalives

func WithNoDisableKeepalives(noDisableKeepalives bool) Option

WithNoDisableKeepalives unsets the default DisableKeepalives setting.

func WithRetryCount

func WithRetryCount(retryCount uint) Option

WithRetryCount sets the number of retries.

func WithRetryWaitMax

func WithRetryWaitMax(t time.Duration) Option

WithRetryWaitMax sets the minimum length of time to wait between retries.

func WithRetryWaitMin

func WithRetryWaitMin(t time.Duration) Option

WithRetryWaitMin sets the minimum length of time to wait between retries.

func WithUserAgent

func WithUserAgent(userAgent string) Option

WithUserAgent sets the media type of the signature.

Jump to

Keyboard shortcuts

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