handler

package
v0.2.13 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler interface {
	// Auth checks if the auth header in webhook request for
	// the specified host is correct.
	Auth(ctx context.Context, host string, authHeader string) error
	// Convert converts source image to target image by specifying
	// source image reference, the conversion is asynchronous, and
	// if the sync option is specified, the HTTP request will be
	// blocked until the conversion is complete.
	Convert(ctx context.Context, ref string, sync bool) error
	// CheckHealth checks the acceld service is healthy and can serve
	// webhook request.
	CheckHealth(ctx context.Context) error
}

Handler for handling HTTP requests.

type LocalHandler

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

func NewLocalHandler

func NewLocalHandler(cfg *config.Config) (*LocalHandler, error)

func (*LocalHandler) Auth

func (handler *LocalHandler) Auth(_ context.Context, host string, authHeader string) error

func (*LocalHandler) CheckHealth

func (handler *LocalHandler) CheckHealth(ctx context.Context) error

func (*LocalHandler) Convert

func (handler *LocalHandler) Convert(ctx context.Context, ref string, sync bool) error

Jump to

Keyboard shortcuts

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