agent

package
v0.13.0-alpha.34 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

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

func NewAgent

func NewAgent(opts ...Option) (*Agent, error)

func (*Agent) Serve

func (c *Agent) Serve(rw http.ResponseWriter, r *http.Request, info *BlobInfo, t *token.Token)

func (*Agent) ServeHTTP

func (c *Agent) ServeHTTP(rw http.ResponseWriter, r *http.Request)

type BlobInfo

type BlobInfo struct {
	Host  string
	Image string

	Blobs string
}

type Option

type Option func(c *Agent) error

func WithAuthenticator

func WithAuthenticator(authenticator *token.Authenticator) Option

func WithCache

func WithCache(cache *cache.Cache) Option

func WithClient

func WithClient(client *http.Client) Option

func WithLogger

func WithLogger(logger *slog.Logger) Option

Jump to

Keyboard shortcuts

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